title: ASP .Net Core empty array query argument binding exception
body: <p>I have a WebAPI controller which looks like this:</p>
  
  <pre><code>[Route("api/[controller]")]
  [ApiController]
  public class ValuesController : ControllerBase
  {
      [HttpGet]
      public ActionResult&lt;string&gt; Get([FromQuery]DataFilter dataFilter)
      {
          return string.Join(Environment.NewLine, dataFilter?.Filter?.Select(f =&gt; f.ToString()) ?? Enumerable.Empty&lt;string&gt;());
      }
  }
  </code></pre>
  
  <p>Nothing fancy, just a controller which recevies some data from query string and outputs it as a response.
  The class it receives looks like this:</p>
  
  <pre><code>public class DataFilter
  {
      public IEnumerable&lt;FilterType&gt; Filter { get; set; }
  }
  
  public enum FilterType
  {
      One,
      Two,
      Three,
  }
  </code></pre>
  
  <p>These are just sample classes to illustrate the problem, which is a validation error when trying to call this method like this:</p>
  
  <pre><code>/api/values?filter=
  </code></pre>
  
  <p>And the response:</p>
  
  <pre><code>{
    "errors": {
      "Filter": [
        "The value '' is invalid."
      ]
    },
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "80000164-0002-fa00-b63f-84710c7967bb"
  }
  </code></pre>
  
  <p>If i set my FilterType to be nullable, it works, but the array simply contains null values in this case. And if used like this:</p>
  
  <pre><code>/api/values?filter=&amp;filter=&amp;filter=
  </code></pre>
  
  <p>It will simply contain 3 null values. And i wanted it to be simply empty or null, since there are no real values passed.</p>
  
  <p>The ASP .Net Core github account contains some similiar issues, but it is repored that they were fixed in 2.2, which is i'm using. But perhaps they are different or i missunderstand something.</p>
  
  <p><strong>EDIT_0</strong>:
  Just to show what i meant about nullable.</p>
  
  <p>If i change my class to this:</p>
  
  <pre><code>public IEnumerable&lt;FilterType?&gt; Filter { get; set; } //notice that nullable is added to an Enum, not the list
  </code></pre>
  
  <p>Then when called like this:</p>
  
  <pre><code>/api/values?filter=&amp;filter=&amp;filter=
  </code></pre>
  
  <p>I get 3 elements in my "Filter" property. All nulls. Not exactly what i expect.
  Good as a workaround, but not a solution at all.</p>