title: Ansible when condition always fails when a dictionary is there but it contains no elements
body: <p>The problem that I am facing is the following: 
  I have the following lines in my vars: </p>
  
  <pre><code>testparams:
    - { name: 'test' , test_type: 'test' }
  </code></pre>
  
  <p>What I need to do, from my tasks, is to include a file when this dictionary is defined. This is my code: </p>
  
  <pre><code>- include: test.yml
    when:  testparams is defined
  </code></pre>
  
  <p>It works when the whole definition of the dictionary is absent. But, when the dictionary definition is there but without any elements inside, this condition fails. I have tried with length, trying to get the type(just run it when it's Dictionary), but everything has failed so far. </p>
  
  <p>Example of defined dictionary without elements:</p>
  
  <pre><code>testparams:
  </code></pre>
  
  <p>Any ideas?</p>