New utility method to known if a given object is an instance of a
className.