Workaround integral check to handle NumPy scalars and one-arrays