def null_convert(value):
    """
    Determine if a where clauses's where_val is checking for 'NULL' or 'NOT NULL' values.

    :param value: Value from a where clause
    :return: Transformed where value if null check passes, else same as input
    """
    if isinstance(value, bool) and value is True:
        return 'NOT NULL'
    elif isinstance(value, str) and value.lower() == 'not null':
        return 'NOT NULL'
    elif isinstance(value, bool) and value is False:
        return 'NULL'
    elif value is None:
        return 'NULL'
    elif isinstance(value, str) and value.lower() == 'null':
        return 'NULL'
    elif isinstance(value, (list, tuple)):
        return value
    elif isinstance(value, set):
        return list(value)
    elif "'" in str(value):
        return '"{0}"'.format(value)
    else:
        return "'{0}'".format(value)
