Listing Texts of Which Custom Field is Null

Don’t let the fields be set to null or unset altogether. The queries needed to get that data are not efficient. Set your field to “no” or some other value.

function save_details(){ 
  global $post; 
  if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) { 
    return $post->ID; 
  }

  $valid = array(
    'yes' => 'yes',
    'no' => 'no'
  );
  if ( isset ( $_POST["field_id"] ) && isset($valid[$_POST["field_id"]]) { 
    update_post_meta($post->ID, 'field_id', $valid[$_POST["field_id"]]); 
  } else {
    update_post_meta($post->ID, 'field_id', 'no');
  }
}

Please sanitize that POST data! In the code above I used a “whitelist” technique. User input never actually hits the database.

You can then query for the “no”s just as you did for the “yes”es.

If you don’t want to take my advise, the query to get the unset/null ones is:

$args = array(
  'ignore_sticky_posts' => true,
  'meta_query' => array(
    array(
      'key' => 'field_id',
      'compare' => 'NOT EXISTS',
    )
  )
);
$q = new WP_Query($args);
var_dump($q->request); // debug
var_dump(wp_list_pluck($q->posts,'post_title')); //debug

And please, please, please do not use query_posts(). Even the Codex says not to.