title: Freemarker "Expected a hash, but this evaluated to a string"
body: <p>I'm using Freemarker as an addition with OpenOffice, to process documents with variables. </p>
  
  <p>Therefore, in this case, I want an adress with either a contact person (if there is one) or just the normal contact details (adress).</p>
  
  <pre><code>[#function GetAdr]
      [#return (recipient)!"unbekannt" /]
  [/#function] 
  
  
  [#function GetAdrWithContact]
      [#return (GetAdr().contact)!"unbekannt" /]
  [/#function]
  
  [#if (GetAdrWithContact().adress)?? ]
  [#if GetAdr().name??]${(GetAdr().name)?xml}&lt;text:line-break /&gt;[/#if][@Adr GetAdrWithContact() /]
  [#elseif (GetAdr().adress)?? ][@Adr GetAdr() /] [/#if]
  [/#macro]
  </code></pre>
  
  <p>If I want to use this code, I get the </p>
  
  <blockquote>
    <p>Expected a hash, but this evaluated to a string</p>
  </blockquote>
  
  <p>error, only for the case if there is no contact person though. It works, as long as there is a contact person.</p>
  
  <p>Edit: I tried to check <code>GetAdrWithContact().adress)</code> with <code>?has_content</code> or <code>?is_string</code>, neither worked.</p>