Add null. Also reduce some logic for non-array objects.