protected static function getClassName($type)
    {
        if (in_array($type, array_keys(self::$elements))) {
            $type = self::$elements[$type];
        }

        if (!class_exists($type)) {
            throw new InvalidArgumentException(
                "Input class '{$type}' does not exists."
            );
        }

        if (! is_subclass_of($type, ElementInterface::class)) {
            throw new InvalidArgumentException(
                "The class '{$type}' does not implement the " .
                "Slick\\Form\\ElementInterface interface."
            );
        }

        return $type;
    }