title: Flutter - Check if array element is null
body: <p>I´m trying to check if object has a null element. For do this I iterate a list and check if has data, finally I need to check if one element of this list is null. If is null doesn´t add to the data list, if has data, add to data list.</p>
  
  <pre><code>List data = List();
  
  final responseJson = json.decode(response.body) as List;
       if (responseJson!=null){
            for (Map data in responseJson) {
                 if(data[‘name']=!null){ &lt;- I need to ignore elements that doesn't have name, but all element (including elements without name) pass for this if.
                      list.add(response[‘name’]):
                 }
            }
       }
  </code></pre>
  
  <p>What is the right way to ignore element that does not contains name and add in the list the elements with name?</p>