check if local variable is defined in view
render "shared/header", { :headline => "Welcome", :person => person } # shared/header <% if local_assigns.has_key? :headline %> Headline: <%= headline %> <% end %>