def urlize(val):
    """
    Ensures a would-be URL actually starts with "http://" or "https://".

    :param val: the URL
    :returns: the cleaned URL

    >>> urlize('gnu.org')
    'http://gnu.org'
    >>> urlize(None) is None
    True
    >>> urlize(u'https://gnu.org')
    'https://gnu.org'
    """
    if val and not val.startswith('http://') and not val.startswith('https://'):
        val = 'http://'+val
    return val