handle null elements in json arrays