title: How to check if variable's type matches Type stored in a variable
body: <pre><code>User u = new User();
  Type t = typeof(User);
  
  u is User -&gt; returns true
  
  u is t -&gt; compilation error
  </code></pre>
  
  <p>How do I test if some variable is of some type in this way?</p>