Get all nodes with empty taxonomies
You query is looking for nodes that are tagged with a term that has an empty label. Obviously that's not what you want. What you're looking for is notExists():

$query = \Drupal::entityQuery('node')
  -&gt;condition('type', 'mycontenttype', '=')
  -&gt;notExists('field_grade_level');

$nids = $query-&gt;execute();
return $nids;