title: About the Firestore query-data documentation specifically DocumentSnapshot
body: <p>In the <a href="https://firebase.google.com/docs/firestore/query-data/get-data" rel="nofollow noreferrer">Firestore query-data get-data</a> docs I want to know in what situation the <code>document != null</code> will evaluate to false? Shouldn't it instead be <code>!document.exists()</code> </p>
  
  <pre><code>DocumentReference docRef = db.collection("cities").document("SF");
  docRef.get().addOnCompleteListener(new OnCompleteListener&lt;DocumentSnapshot&gt;() {
      @Override
      public void onComplete(@NonNull Task&lt;DocumentSnapshot&gt; task) {
          if (task.isSuccessful()) {
              DocumentSnapshot document = task.getResult();
              if (document != null) {
                  Log.d(TAG, "DocumentSnapshot data: " + task.getResult().getData());
              } else {
                  Log.d(TAG, "No such document");
              }
          } else {
              Log.d(TAG, "get failed with ", task.getException());
          }
      }
  });
  </code></pre>