protected function isAbstract($middleware): bool
    {
        return is_string($middleware) &&
            class_exists($middleware) &&
            is_a($middleware, MiddlewareInterface::class, true);
    }