title: umbraco razor - check if field exists
body: <p>I have the follow code, however I get an error if I have no image (it is a media picker)</p>
  
  <pre class="lang-cs prettyprint-override"><code>&lt;umbraco:Macro runat="server" language="cshtml"&gt;
  @{
      dynamic image = new umbraco.MacroEngines.DynamicMedia(@Model.whereMap);
      &lt;img class="where-map" src="@image.umbracoFile" width="150" height="250"/&gt;
   }
  &lt;/umbraco:Macro&gt;
  </code></pre>
  
  <p>I have tried all the obvious stuff for checking a null valaue but no joy.</p>
  
  <p>Thanks</p>