Improved error handling if attempted to serialize types not handled by the binary serialization.