Smarter test of children

Test children for empty array, null value, and two different undefined.
Much better for autogenerated json.