title: What is the common way to cast non-nullable or return default(Type)
body: <p>Working with all the dictionaries within ASP.NET MVC (like RouteData, DataTokens etc), I often find myself wanting to do stuff like:</p>
  
  <pre><code>bool isLolCat = routeData["isLolcat"] as bool
  </code></pre>
  
  <p>that would return the casted value, or default (false in this case) when the value is null.</p>
  
  <p>Is there any short, readable, simple way to do this, or am I better off writing a helper extension method?</p>
  
  <p>An extension method would something like this.</p>
  
  <pre><code>bool isLolCat = routeData["isLolcat"].TryCast&lt;bool&gt;();
  </code></pre>
  
  <ul>
  <li>I rather don't want to reinvent the wheel with custom syntax if there is a common way to do this.</li>
  <li>I don't want to litter my code with a few lines, when I just to try to get a bool out of a dictionary.</li>
  </ul>