handle nulls in the nested data