Better check for link generation
Don't serialize attributes with nil values when the object is read-only because it may not be true