protected function checkEmptyHook($params)
    {
        $hookName = $this->getParam($params, 'rel');

        if (null == $hookName) {
            throw new \InvalidArgumentException(
                $this->translator->trans("Missing 'rel' parameter in ifhook/elsehook arguments")
            );
        }

        if (!isset($this->hookResults[$hookName])) {
            $exception = new \InvalidArgumentException(
                $this->translator->trans("Related hook name '%name' is not defined.", ['%name' => $hookName])
            );

            Tlog::getInstance()->error($exception->getMessage());

            if ($this->debug) {
                throw $exception;
            }

            return true;
        }

        return (is_string($this->hookResults[$hookName]) && '' === $this->hookResults[$hookName]
            || !is_string($this->hookResults[$hookName]) && $this->hookResults[$hookName]->isEmpty()
        );
    }