public static function isValid($httpUri): bool
    {
        if ($httpUri instanceof self) {
            return true;
        }

        if (empty($httpUri) || !is_string($httpUri)) {
            return false;
        }

        try {
            self::fromString($httpUri);
        } catch (MalformedUri $murle) {
            return false;
        }

        return true;
    }