//check if the method exists in a class