Fix type detection for properties

To reproduce, add a property using updatePropertyWithValue that is not a text type, i.e CREATED. Detection doesn't find the uppercase CREATED, makes it a text property, which is not expected by other parts of the code and causes trouble when serializing.