title: CakePHP 3 advanced Query Not Null with strange "QueryExpression" error?
body: <p>I am putting together a small mailing application within my application, and have run into a strange error - even just following the instructions for the advanced queries. I need to get -just- the mailboxes that are named:</p>
  
  <pre><code>    $CoreMailboxes = TableRegistry::get('CoreMailboxes');
      $query = $CoreMailboxes-&gt;find()
          -&gt;where(function (QueryExpression $exp, Query $q) {
              return $exp-&gt;isNotNull('name');
          });
      $query-&gt;hydrate(false);
      return $query-&gt;toArray();
  </code></pre>
  
  <p>This is a near duplicate, sans "hydrate: false", of the example in the Cake Cookbook. However, it's giving me an error of </p>
  
  <pre><code>   Argument 1 passed to App\Model\Table\CoreMailboxesTable::App\Model\Table\{closure}() must be an instance of App\Model\Table\QueryExpression, instance of Cake\Database\Expression\QueryExpression given
  </code></pre>
  
  <p>The query in the Cookbook is this: </p>
  
  <pre><code>    $query = $cities-&gt;find()
          -&gt;where(function (QueryExpression $exp, Query $q) {
              return $exp-&gt;isNotNull('population');
          }); 
  </code></pre>
  
  <p>What am I doing wrong?</p>