handle null elements in incoming json