Ignoring nil values when property is optional

prevents unnecessary sending of null when a property is marked as optional and has no value.