Check if Field Equals Null in MongoDb C# Driver 2.0
<p>I have a very simple query for mongo:</p>

<pre><code>db.items.find( { MyFieldName: { $exists: true, $eq: null } } );
</code></pre>

<p>Not that it needs to be explained, but it finds documents which have a <code>MyFieldName</code> and where the value of that field is <code>null</code>. It seems like this would be really simple to do with the C# driver:</p>

<pre><code>var fieldExistsFilter= Builders&lt;BsonDocument&gt;.Filter.Exists("MyFieldName", true);
var fieldValueIsNullFilter = Builders&lt;BsonDocument&gt;.Filter.Eq("MyFieldName", null); 
</code></pre>

<p>However the second filter, <code>fieldValueIsNullFilter</code>, does not build if I try to check for null. It works fine if I write <code>"testString"</code> or anything like that, but not with null.</p>

<p><strong>tl:dr; version: How do I create a filter to check if field is null in MongoDb C# driver?</strong> </p>

<p>Note, I checked other answers and they recommend $exists does what I want - it does not, as per <a href="https://docs.mongodb.com/manual/reference/operator/query/exists/#op._S_exists" rel="noreferrer">mongo docs</a>:</p>

<blockquote>
  <p>When  is true, $exists matches the documents that contain the
  field, <strong>including documents where the field value is null</strong>. If 
  is false, the query returns only the documents that do not contain the
  field.</p>
</blockquote>