def test_url(url_to_test):
    """Basic testing to check if url is valid.

    Arguments:
        url_to_test {str} -- The url to check

    Returns:
        int -- Error number
    """
    if not isinstance(url_to_test, str):
        return 103
    url = str(url_to_test).strip()
    if not url:
        return 101
    if ' ' in url:
        return 102
    return 0