title: How to check if a given value is a number or not in Freemarker?
body: <p>In freemarker how do I find out if a particular value is a number or not. Is there any specific method to check if a given value is a number or not in freemarker?</p>
  
  <pre><code>&lt;#if (link_data.canonical)!?matches(".*/sites/.*") &amp;&amp; (pageData.ar.gP)?has_content &gt;
      &lt;#if (pageData.ar.gP)?is_number &gt;
          &lt;link rel="author" href="https://plus.google.com/${(pageData.ar.gP)!}" /&gt;
      &lt;#else&gt;
          &lt;link rel="ar" href="https://plus.google.com/+${(pageData.ar.gP)!}" /&gt;
      &lt;/#if&gt;
  &lt;/#if&gt;
  </code></pre>
  
  <p>The above code does not work for me.</p>