protected function checkValue($input)
    {
        if ('' === $input || !is_array($this->rootNodes)) {
            return;
        }

        if (false === strpos($input, ',')) {
            $ids = [(int) $input];
        } else {
            $ids = array_map('intval', array_filter(explode(',', $input)));
        }

        if (count(array_diff($ids, array_merge($this->rootNodes, Database::getInstance()->getChildRecords($this->rootNodes, 'tl_news_category')))) > 0) {
            $this->addError($GLOBALS['TL_LANG']['ERR']['invalidPages']);
        }
    }