Unable to check null for header value in request
<p>I tried to get header value like below -</p>

<pre><code>IEnumerable&lt;string&gt; headerValues = request.Headers.GetValues("MyCustomerId");
var id = headerValues.FirstOrDefault();
</code></pre>

<p>If header value is null or not present it is throwing error - <code>InvalidOperationException</code></p>

<p>The null check for <code>GetValues</code> doesn't serve any value as it will never return null. If the header doesn't exist you will get an InvalidOperationException</p>

<p>Any trick to do so?</p>