public static function isDomain($domain)
    {
        if (!is_string($domain)) {
            throw new \ErrorException('Accept string ' . gettype($domain) . ' given');
        }

        return  (bool) preg_match(
            '/^((https?|ftps?|ssl|url|git):\/\/)?[a-zA-Z0-9-_.]+\.[a-z]{2,6}$/',
            $domain
        );
    }