utils.check.datatype function

Utility function to check the class of an object passed to a function