def valid_url(string):
    """Checks if the given url is valid

    Parameters
    ----------
    string: str
        Url which needs to be validated

    Returns
    -------
    bool
    """
    if string and (string[:7] == "http://" or string[:8] == "https://"):
        return True
    return False