def ip_exists(ip_address, client):
    """Determines whether an IP address already exists in database

    Args:
        ip_address
        client: pymongo client used to connect to mongodb database

    Return:
        exists: boolean indicating whether an IP address exists in database

    """
    user_collection = client.db.user
    exists = bool(user_collection.find_one({'ipAddress': ip_address}))
    return exists