title: snapshot.data.length in the itemcount does not work: "The getter 'length' was called on null"
body: <p>I am trying to fetch documents from firestore with the following code: </p>
  
  <pre><code> Future getCategories() async {
      var firestore = Firestore.instance;
      QuerySnapshot qn = await firestore.collection("categories").getDocuments();
      return qn.documents;
    }
  
   @override
    Widget build(BuildContext context) {
      return Container(
        child:FutureBuilder(
          future:getCategories(),
          builder:(context, snapshot){
            if(snapshot.connectionState == ConnectionState.waiting){
              return Center(
                child:Text("Loading...")
              );
           }
           else
           {
             return GridView.builder(
               itemCount: snapshot.data.length,
               gridDelegate: new SliverGridDelegateWithFixedCrossAxisCount(
                   crossAxisSpacing: 6.0, mainAxisSpacing: 6.0, crossAxisCount: 2),
                itemBuilder: (BuildContext context, int index) {
                  return SingleCategory(
                    category_name:  snapshot.data[index].data["title"],
                    category_picture: snapshot.data[index].data["picture"],
                  );
                }
             );
           }
          }
        )
      );
  </code></pre>
  
  <p>When I run the code, I get the following error: </p>
  
  <blockquote>
    <p>I/flutter ( 7555): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY
    ╞═══════════════════════════════════════════════════════════ I/flutter
    ( 7555): The following NoSuchMethodError was thrown building
    FutureBuilder(dirty, state: I/flutter ( 7555):
    _FutureBuilderState#c3e7b): I/flutter ( 7555): The getter 'length' was called on null. I/flutter ( 7555): Receiver: null
    I/flutter ( 7555): Tried calling: length I/flutter ( 7555):  I/flutter
    ( 7555): When the exception was thrown, this was the stack: I/flutter
    ( 7555): #0      Object.noSuchMethod
    (dart:core/runtime/libobject_patch.dart:50:5)</p>
  </blockquote>
  
  <p>Can anyone help me please. </p>