made serializing null values configurable