handle elements that appear optionally in the JSON input