BUG: fix wrong error checks of PyBytes_AsStringAndSize

The check in ufunc_type_resolution.c is broken due to a spurious not and
a few cases of TypeError being overwritten without clearing.
Also change all of these error checks to a negative check for
consistency.