title: Check ViewBag Value is present in javascript
body: <p>I am using razor template and following is the scenario</p>
  
  <pre><code>$(function(){
     //if (ViewBag.IsCallFunction){
        somefunction();
     //
    //do something else
  });
  </code></pre>
  
  <p>If a viewBag variable is present, i.e. not null and if it is set to true, then I would like to call some javascript function. How do I do this?</p>