title: How to check if Cloud Firestore collection exists? ( querysnapshot)
body: <p>I'm having trouble with checking if my collections exists in Firestore database.
  When I was working with Firebase Realtime database i could have used:</p>
  
  <pre><code>if(databaseSnapshot.exists) 
  </code></pre>
  
  <p>Now with Firestore I wanna do the same.
  I have already tried               </p>
  
  <pre><code>  if (documentSnapshots.size() &lt; 0) 
  </code></pre>
  
  <p>but it doesn't work.
  Here is the current code: </p>
  
  <pre><code>public void pullShopItemsFromDatabase() {
      mShopItemsRef.get().addOnCompleteListener(new OnCompleteListener&lt;QuerySnapshot&gt;() {
          @Override
          public void onComplete(@NonNull Task&lt;QuerySnapshot&gt; task) {
              if (task.isSuccessful()) {
                  for (DocumentSnapshot document : task.getResult()) {
                      ShopItem shopItem = document.toObject(ShopItem.class);
                      shopItems.add(new ShopItem(shopItem.getImageUrl(), shopItem.getTitle(), shopItem.getSummary(), shopItem.getPowerLinkID(), shopItem.getlinkToShopItem(),shopItem.getLinkToFastPurchase(), shopItem.getKey(), shopItem.getPrice(),shopItem.getVideoID()));
                  }
                  if (shopItems != null) {
                      Collections.sort(shopItems);
                      initShopItemsRecyclerView();
                  }
              } else {
                  Log.w(TAG, "Error getting documents.", task.getException());
                  setNothingToShow();
              }
          }
      });
  }
  </code></pre>
  
  <p>the function:                     setNothingToShow();
  Is actually what I wanna execute if my collection is empty / doesn't exists.
  Please advise!
  Thanks,
  D.</p>