title: Sitecore - render Code if item is NULL
body: <p>In Sitecore you can easily render a context item's value by using</p>
  
  <pre><code>@RenderingContext.Current.Rendering.Item["itemname"]
  </code></pre>
  
  <p>However: when I place a Controller Rendering to a placeholder there is no content assigned yet. therefore nothing will be rendered, and therefore I can't check for null.</p>
  
  <p>My specific problem:<br>
  I want to add the value of a database item to the parameters of a call.</p>
  
  <pre><code>var options = {{lat: @RenderingContext.Current.Rendering.Item["lat"],
      lng: @RenderingContext.Current.Rendering.Item["lng"]},
      zoom: @RenderingContext.Current.Rendering.Item["zoom"]};
  </code></pre>
  
  <p>As there is simply NOTHING (yet) the partial view fails to load because there is no associated content (yet) ==> javascript error. If there is content it works fine.</p>
  
  <p>So how can I </p>
  
  <ul>
  <li>Add a default associated content item to a controller rendering (mhhhh)</li>
  <li>Check if ?NOTHING? is null? (better)</li>
  </ul>
  
  <p>Any idea?
  Anyone who's got my problem?</p>
  
  <p>Cheers!</p>