Properly check for HANDLE values that cannot be serialized to an __int32 string