def check(product, data):
    """Check if product does not exist in the data"""

    if type(data) == dict:
        data = data.values()
    for d in data:
        if product == d:
            return False
    return True