fixes #353 - setting child properties of null values causes nulls to be replaced with objects/arrays as appropriate