added class_exists() if statement
added code if the method does not exist