Changed primitive types serialize and size methods to do nothing if there is no value set.