Cleanup stuff

Removed all the scattered is<type> functions and replace them with one
global function.