Returns a type guard function that checks if the given value is an instance of clazz
the class to check
Returns a type guard function that checks if the given value is an instance of clazz