public static String checkUrl(String url) {
        if (StringUtils.isEmpty(url)) {
            return null;
        }

        url = url.trim().replace(" ", "%20");
        if (!url.contains("://")) {
            url = "http://" + url;
        }
        
        if (url.equals("http://")) {
            return null;
        }

        try {
            URL urlObj = new URL(url);
        }
        catch (MalformedURLException e) {
            return null;
        }

        return url;
    }