strip null-termination from bytes-sockopts

excluding IDENTITY
utf16 test fix
use numpy.isnan

to make sure no nan