do not write assoc/assocNulls unless there is actually data to write