title: How to make ASP.NET to stop interpret null as string
body: <p>I have a Web API method:</p>
  
  <pre><code>public List&lt;Task&gt; GetTasks([FromUri] TaskFilter filter)
  {
  
  }
  </code></pre>
  
  <p>The method has parameter with list of nullable identifiers:</p>
  
  <pre><code>public class TaskFilter
  {
    public IList&lt;int?&gt; Assignees { get; set; }
  }
  </code></pre>
  
  <p>When I call it:</p>
  
  <pre><code>GET /tasks?assignees=null
  </code></pre>
  
  <p>Server returns an error:</p>
  
  <pre><code>{
    "message":"The request is invalid.",
    "modelState": {
      "assignees": [ "The value 'null' is not valid for Nullable`1." ]
    }
  }
  </code></pre>
  
  <p>It works only if I pass empty string:</p>
  
  <pre><code>GET /tasks?assignees=
  </code></pre>
  
  <p>But standard query string converters (from <s>JQuery,</s> Angular, etc) do not work with nulls in such way.</p>
  
  <p>How to make ASP.NET to interpret <code>'null'</code> as <code>null</code>?</p>
  
  <p><strong>Upd:</strong> The query string can contain several identifiers, e.g.:</p>
  
  <pre><code>GET /tasks?assignees=1&amp;assignees=2&amp;assignees=null
  </code></pre>
  
  <p><strong>Upd2:</strong> JQuery converts nulls in array to empty strings, and ASP.NET interprets them as null. So the question is about calling WebAPI from Angular 1.6 (<code>$HttpParamSerializerProvider</code>)</p>
  
  <p><strong>Upd3:</strong> I know about workarounds, but I do not ask for them. I want a solution for specific problem:</p>
  
  <ul>
  <li>It is a GET method</li>
  <li>Method accepts a list from Uri</li>
  <li>A list can contain <code>null</code> values</li>
  <li>It should be <code>List&lt;int?&gt;</code> because API docs are generated automatically, and I do not want to see <em>text array</em> as parameter type</li>
  <li>By default ASP.NET expects empty strings for null values (<code>JQuery.param</code> works in that way)</li>
  <li>But some client libraries (e.g. Angular) does not convert <code>null</code> array items to empty strings</li>
  </ul>