Better to do
```
if issubdtype(dtype, np.integer):
```