title: The getter 'length' was called on null when called on Map object
body: <p>I forgot to call <code>json.encode</code> on my Map object before sending post request.</p>
  
  <p>Wrong code:</p>
  
  <pre><code>var response = await http.post(url, body: data, headers: {"Accept": "application/json"});
  </code></pre>
  
  <p>Right code:</p>
  
  <pre><code>var response = await http.post(url, body: json.encode(data), headers: {"Accept": "application/json"});
  </code></pre>
  
  <p>On wrong code I got unexpected error:</p>
  
  <blockquote>
    <p>The getter 'length' was called on null.</p>
  </blockquote>
  
  <p>I am trying understand why? <code>data</code> is <code>Map</code> and it's not null. </p>