title: How to resolve 'Use not null pattern...' suggestion in switch statement
body: <p>In Visual Studio 2019, trying to use some newer features of c#, specifically newer features of the switch statement.</p>
  <p>I want to switch on the type of an object, and I've seen a few ways to accomplish this, I'm using this approach:</p>
  <pre><code>private string MyFunc (Employee q)
    ....
    Type qt = q.GetType();
    switch (qt)
    {
       case Type _ when qt == typeof(HumanResources):
           //some code
           break;
       case Type _ when qt == typeof(Sales):
           //some code
           break;
       .....
       default:
           break;
    };
    .....
  }
  </code></pre>
  <p>I've changed class names and obviously am not showing all code. However the <em>case Type</em> has the squiggly lines with the following suggestion/comment:</p>
  <p><a href="https://i.stack.imgur.com/qnXNx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qnXNx.png" alt="enter image description here" /></a></p>
  <p>I would like to implement the suggestion, but cannot figure out how. Any help would be appreciated, thanks.</p>