null values should be preserved as a property

Fixes #1298 

@mattpap this solve the problem as best I can tell, and unit tests pass, but please comment on any concerns.