code: protected function _checkConfig()
      {
          if (!$this->query)
              throw new InvalidConfigException(Yii::t('wavecms/main', 'The "query" property must be set.'));
  
          if (!$this->query instanceof ActiveQuery)
              throw new InvalidConfigException(Yii::t('wavecms/main', 'The "query" property is not instance of ActiveQuery.'));
      }
docs: Check if $this->query is set
  @throws \yii\base\InvalidConfigException