public static function isClassAttribute($className, $attrName)
    {
        if (!self::attributesSetFor($className)) {
            // # TODO: this logic doesn't make sense because the classes implementing
            // # AttributedModelTrait require a piece of code to register their attributes.
            // return false;
            throw new Exception\RuntimeException(
                sprintf("Attributes not set for class %s", $className)
            );
        }
        // return in_array($attrName, self::$classAttributes[$className]);
        return self::$classAttributes[$className]->exists($attrName);
    }