toMutableDomainEventRecord
Extension function to convert a DomainEventRecord to a MutableDomainEventRecord.
If the record is already mutable, returns it as-is. Otherwise, creates a new MutableDomainEventRecord wrapping the underlying ObjectNode.
Receiver
The domain event record to convert
Return
A mutable version of the domain event record