private function checkAgainstPattern(?string $tagContent = null): bool
    {
        if (!$return = $this->isValidContent($tagContent)) {
            throw (new CodeError(static::CODE_TAG_MISSING_VARIABLE, self::MESSAGE_TAG_MISSING_VARIABLE, $this->stackPos))
                ->setPayload([$tagContent])
                ->setToken($this->token);
        }

        return $return;
    }