Refactored check for numpy

- Fall back using ImportError
- Assign functions to avoid conditionals