title: I have 3 issues from migrating to null-safety
body: <p>I migrated to null-safety today and I have 3 issues that I don't know how to fix. Below, I have provided the errors and the code that each error refers to. I do not know how to fix these issues and they are the only errors left.</p>
  <pre><code>error • The body might complete normally, causing 'null' to be returned, but the return type is a potentially non-nullable type at lib\Services\firestore_service.dart:29:16 • (body_might_complete_normally)
  
  Future&lt;Void&gt; saveNewAgency(Agency agency) async {
      await _db.collection('agency').doc(globals.agencyId).set(agency.toMap());
    }
  
        error • The property 'docs' can't be unconditionally accessed because the receiver can be 'null' at lib\screens\agent_dash_board.dart:57:43 •(unchecked_use_of_nullable_value)
  I fixed similar errors to this one with the code at itemCount: (snapshot.data! as QuerySnapshot).docs.length,  in the code snippet. 
      
      return new ListView.builder(
                            itemCount: (snapshot.data! as QuerySnapshot).docs.length,
                            itemBuilder: (BuildContext context, int index) {
                              Trxns trxns = Trxns.fromFirestore(
                                  snapshot.data.docs[index].data());
  
    error • The body might complete normally, causing 'null' to be returned, but the return type is a potentially non-nullable type at lib\screens\appointment_calendar.dart:434:31 • (body_might_complete_normally)
  
  Map&lt;DateTime, List&lt;Event?&gt;&gt; convertToMap(List&lt;Event&gt; item) {
      Map&lt;DateTime, List&gt;? result;
  
      for (int i = 0; i &lt; item.length; i++) {
        Event data = item[i];
        //get the date and convert it to a DateTime variable
        //DateTime currentDate = DateFormat('MM-dd-yyyy - kk:mm').format(data.eventDate);
        DateTime currentDate = DateTime(data.eventDate!.year, data.eventDate!.month, data.eventDate!.day, data.eventDate!.hour, data.eventDate!.minute);
  
        List eventNames = [];
        //add the event name to the the eventNames list for the current date.
        //search for another event with the same date and populate the eventNames List.
        for (int j = 0; j &lt; item.length; j++) {
          //create temp calendarItemData object.
          Event temp = item[j];
          //establish that the temp date is equal to the current date
          if (data.eventDate == temp.eventDate) {
            //add the event name to the event List.
            eventNames.add(temp.eventName);
          } //else continue
        }
  
        //add the date and the event to the map if the date is not contained in the map
        if (result == null) {
          result = {
            currentDate: eventNames
          };
        } else {
          result[currentDate] = eventNames;
        }
        return result as Map&lt;DateTime, List&lt;Event?&gt;&gt;;
      }
    }
  </code></pre>