public function isAccepted($value, $var = null)
    {
        if ($this->getContentInstance() instanceof ContentSet) {
            if (!($value instanceof AbstractClassContent)) {
                // ContentSet accepts only AbstractClassContent elements
                return false;
            }

            if (in_array('!' . $this->_getType($value), $this->_accept)) {
                // ContentSet can exclude content types
                return false;
            }

            $acceptArray = array_filter($this->_accept, function($item) { return '!' !== substr($item, 0, 1); });
        } else {
            if (null === $var) {
                return false;
            }

            if (!array_key_exists($var, $this->_accept)) {
                return true;
            }

            $acceptArray = $this->_accept[$var];
        }

        if (0 === count($acceptArray)) {
            return true;
        }

        return in_array($this->_getType($value), $acceptArray);
    }