public function verifyClosure(Dispatch $dispatch): void
    {
        // If a closure is set and is not callable
        if (
            null === $dispatch->getFunction()
            && null === $dispatch->getClass()
            && null === $dispatch->getMethod()
            && null === $dispatch->getProperty()
            && null === $dispatch->getClosure()
        ) {
            // Throw a new invalid closure exception
            throw new InvalidClosureException(
                'Closure is not valid for : '
                . $dispatch->getName()
            );
        }
    }