private function assert($value, $word = '')
    {
        if ($value) {
            if ($this->not) {
                throw new \Exception(
                    empty($word)
                    ? 'Field contain a value, but should not.'
                    : "Element is $word, but should not be."
                );
            }
        } else {
            if (!$this->not) {
                throw new \Exception(
                    empty($word)
                    ? 'Field does not contain a value.'
                    : "Element is not $word."
                );
            }
        }
    }
private function assert($value, $word = '')
    {
        if ($value) {
            if ($this->not) {
                throw new \Exception(
                    empty($word)
                    ? 'Field contain a value, but should not.'
                    : "Element is $word, but should not be."
                );
            }
        } else {
            if (!$this->not) {
                throw new \Exception(
                    empty($word)
                    ? 'Field does not contain a value.'
                    : "Element is not $word."
                );
            }
        }
    }
@param bool $value
Value for checking.
@param string $word
A word for default message (e.g. "checked", "selected", etc).

@throws \Exception