title: Firebase - doc exists but doc.exists returns false
body: <p>I am trying to test whether a document exists with title uid. I have confirmed that the document exists in Firestore within the users collection, but doc.exists always returns false. Note that my document uid contains only collections (no fields).</p>
  
  <pre><code>  firebase.auth().onAuthStateChanged((user) =&gt; {
            if (user) {
              // User is signed in.
              var uid = user.uid
              db.collection("users").doc(uid)
                .get()
                .then((doc) =&gt; {
                  console.log(doc)
                  if (doc.exists) {
                    console.log('returning user')
                  } else {
                    console.log('new user')
                  }
              }).catch(function(error) {
                  console.log("Error getting document:", error);
              });
            } else {
              // User is signed out.
              // ...
            }
  </code></pre>