The old Attribute.isAttribute would allow objects lacking the toBer
method to be attached to Change objects. This would result in errors
during serialization.
With the stricter Attribute detection, it's necessary to convert
Attribute-like objects containing type (string) and vals (array)
properties into real Attribute objects. This precise detection is
necessary to avoid falling back to the object-keys-into-attributes
That other logic which will turn a well structured Attribute-like object
such as this:
{ type: 'valid', vals: ['something'] }
... and turn it into something broken like this:
[
{ type: 'type', vals: ['valid'] },
{ type: 'vals', vals: ['something'] }
]