title: How to avoid [] called on null in Flutter
body: <p>Is there is a method in dart to judge whether an object is null or not, and then decide to get ['data'] or do nothing? </p>
  
  <p>This is the error message:</p>
  
  <blockquote>
    <p>The following NoSuchMethodError was thrown building Builder:
    The method '[]' was called on null.
    Receiver: null
    Tried calling: </p>
  </blockquote>