Adds a check for null property values during property encoding