Converts a number or bigint to ObjectDatagramType.
The value to convert.
The corresponding ObjectDatagramType.
Error if the value is not valid.
Converts a number or bigint to ObjectDatagramType.