title: String.Trim() in Razor view
body: <p>Why <code>String.Trim()</code> throws an exception on <code>string.empty</code> when it is used in a Razor view like this:</p>
  
  <pre><code>console.log('@Model.Test.FirstOrDefault().Trim()');
  </code></pre>
  
  <p>(the list is empty so i get <code>string.empty</code>) and then:</p>
  
  <pre><code>Server Error in '/' Application.
  Object reference not set to an instance of an object.
  (...)'
  Line 326:            console.log('@Model.Test.FirstOrDefault().Trim()');
  </code></pre>