title: Check if a map is empty in Apache Velocity
body: <p>In my java/spring app, I have a velocity template in which I create a map which will hold values also inserted in the template:</p>
  
  <pre><code>#set ($myMap = {})
  </code></pre>
  
  <p>What I want to do is have an if/else checking if the map is empty.  This doesn't seem to be working for me.  I've tried:</p>
  
  <pre><code>#if ($myMap.empty)
  ...
  #if ($myMap.size == 0)
  </code></pre>
  
  <p>Neither of these work.  What is the correct way to check if a Map is empty in velocity.  I've tried searching the Documentation and SO, but I can't find an example.</p>