__numpy_ufunc__ check improvement

the first two commits of gh-4186 which are useful on their own right and need not waiting until `__numpy_ufunc__` is fixed

see commit messages for details.