protected function isBool($key) : bool
    {
        $allowed = [true, false, 0, 1, '0', '1'];

        if (isset($this->param[$key]) && in_array(strtolower($this->param[$key]), $allowed, true)) {
            return true;
        }

        $this->errors[$key.self::ERROR] = $this->convertToFieldName($key).' must be boolean.';

        return false;
    }