title: razor - check if parameter is null and list has arguments
body: <p>I have a list of strings and the following code in cshtml</p>
  
  <pre><code>@foreach (string tag in Model.TagsList)
  {
      &lt;li&gt;@tag&lt;/li&gt;
  } 
  </code></pre>
  
  <p>If I call my page without model I get the following exception 
      Message=Object reference not set to an instance of an object.</p>
  
  <p>How do I check if model is not null and if my list has values?</p>