I'm not sure all these nil checks are required. Are we sure not serializing properties as opposed to serializing a nil value is the same behaviour in all cases?