title: Flutter : Conditions must have a static type of 'bool'
body: <p>I'm trying to learn firebase with flutter and i ran into this problem
  here is my code :</p>
  <pre><code> FirebaseFirestore.instance
              .collection('attendees')
              .doc(user.uid)
              .snapshots()
              .listen((snapshot) {
            if (snapshot.data() != null) {
              if (snapshot.data()!['attending']) {
                _attending = Attending.yes;
              } else {
                _attending = Attending.no;
              }
            } else {
              _attending = Attending.unknown;
            }
            notifyListeners();
          });
  </code></pre>
  <p>what is the solution ?
  the exact problem is within this line :
  if (snapshot.data()!['attending']) {</p>
  <p>how can I rewrite this so i wont ruin the current functionality ?
  I appreciate  your help inadvance</p>