Remove null ids in serializeHasMany method (new records)