Serialize and deserialize the newValue in a ValueChangedOperation based on the value type.
Fix type error by casting.