private function methodCheck($class, string $action): bool
    {
        try {
            // If method not found in required class
            if (!\method_exists($class, $action)) {
                $className = \get_class($class);
                throw new Exception("Method \"$action\" is not found in \"$className\"");
            }
        } catch (Exception $e) {
            return false;
        }
        return true;
    }