title: check for None in an array in flask (jinja template)
body: <p>I have a weird situation where array has value as None:</p>
  
  <p><code>'synonyms': [None]</code></p>
  
  <p>The json format of data in mongo is as:</p>
  
  <pre><code>{
      "_id": {
          "$oid": "5e0983a63bcf0dab51f32a9d"
      },
      "word": "vulgarizer",
      "wordset_id": "c0c349060a",
      "labels": [{
          "name": "American",
          "is_dialect": true
      }],
      "meanings": [{
          "id": "3cb39b55e5",
          "def": "someone who makes attractive to the general public",
          "speech_part": "noun",
          "synonyms": ["populariser"]
      }, {
          "id": "865bfdea0b",
          "def": "someone who makes something vulgar",
          "speech_part": "noun",
          "synonyms": [null]
      }],
      "editors": ["lefurjah"],
      "contributors": ["luxfactaest", "msingle", "bryanedu"]
  }
  </code></pre>
  
  <p>But when I tried printing the same in python it showed up as:</p>
  
  <pre><code>'meanings': [{
      'id': '3cb39b55e5',
      'def': 'someone who makes attractive to the general public',
      'speech_part': 'noun',
      'synonyms': ['populariser']
  }, {
      'id': '865bfdea0b',
      'def': 'someone who makes something vulgar',
      'speech_part': 'noun',
      'synonyms': [None]
  }]
  </code></pre>
  
  <p>How do I check this value in <code>if</code> condition :</p>
  
  <p>I have tried as:</p>
  
  <pre><code>{% if meaning['synonyms'] is defined and meaning['synonyms']|length &gt; 0 %}
      do something-- if condition matches
  </code></pre>
  
  <p>But the None in array doesn't refer to a null value ?</p>
  
  <p>Any possible solution? TIA</p>