class UrlValidator {

    public static boolean isValid(String url) {
        if (url == null || url.isEmpty()) return false;
        try {
            new URL(url);
            return true;
        } catch (MalformedURLException e) {
            return false;
        }
    }

}