title: else block being executed when first condition is satisfied
body: <p>I know there's a bunch of these type of questions but I can't find one that answers the underlying issue.</p>
  
  <p>I have a simple block of code where the IF condition is true but then the else block executes anyway. I have checked in the debug console that the condition is indeed true.</p>
  
  <pre><code>    if (@Model.MajorAvailable.ToString().ToLower() == 'true') {
          $("#checkyes").attr('checked', true);
      } else {
          $("#checkno").attr('checked', true);
      }
  </code></pre>