def check_url(url):
    """
    Helper function to check if a url starts with http or https, if not
    corrects it with https:// in the start of the string.

    :param url:
    :return:
    """
    if url:
        for starts in ['http://', 'https://', 'front:', '/', 'mailto:',
            'tel:', 'sms:']:
            if url.lower().startswith(starts):
                break
        else:
            url = 'https://' + url
    else:
        url = ''
    return url
