If we are going to add a check here, I would prefer to write something more general like `if data.dtype.kind != 'O'`. But it's not entirely clear to me why that's the right choice...