def check_valid(subset_json):
    """Helper to check if a file is valid, given a subset json instance
    Args:
        subset_json: Defined subset json file data
    Returns:
        bool: True/false value for validity
    """
    if subset_json is None:
        return lambda path: True

    def curry(image_path):
        if image_path in subset_json:
            return True
        return False

    return curry