convert
Converts a Kotlin value into something a codec can encode.
Return
A value a registered codec can encode, or null.
Parameters
source
The value being sent; null passes straight through.
expectedOid
The OID the server expects, or 0 when it is not known.
Throws
NO_CONVERTER_FOUND if nothing claims the value and the target codec cannot accept its class, CONVERSION_ERROR if a converter failed.