support sets in trim_nulls()