title: Handlebars if method returns null / empty string
body: <p>I currently use handlebars in java (com.github.jknack.handlebars)
  and have a handlebars helper method to get a link (with some logic behind)</p>
  
  <pre><code>{{ getLink data.node}}
  </code></pre>
  
  <p>which just render the url /subfolder/link.html</p>
  
  <p>In my handlebars template I now only want to print the url (a-tag) when the helper method returns a non empty string (e.g. there is a link available)</p>
  
  <p>I tried it with </p>
  
  <pre><code>{{#if getLink data.node }}
       &lt;a href="{{ getLink data.node}}"&gt;Link-Text&lt;/a&gt;
  {{/if}}
  </code></pre>
  
  <p>but no link was rendered</p>
  
  <p>What would be the correct syntax for my if?</p>
  
  <p>Thanks
  RCX</p>
  
  <p>Edit:
  getLink Helper Method in LinkHelper.class</p>
  
  <pre><code>public CharSequence getLink(JsonObject node, Options options) throws IOException {
      String link = fetchLink(node);
      if(link != null){
          return link;
      }
      return "";
  }
  </code></pre>
  
  <p>registered via</p>
  
  <pre><code>    HandlebarsTemplateEngineImpl.getHandlebars().registerHelpers(new LinkHelper());
  </code></pre>