fix null serialization, should help with #1092