title: Check if data is found in firebase
body: <p>Hi I was a making request for firebase to find the Score of current user. That works fine, however I need to check also does it have any score. If so the score is getting displayed on Toast message. If score does not exist show 0.
  I tried to use child.exist() method but it seems not working as it only shows the score if its found. But shows no response for !child.exist() method.</p>
  
  <p>Maybe somebody could tell me what I am doing wrong ? Thanks<a href="https://i.stack.imgur.com/WElpU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WElpU.png" alt="enter image description here"></a> </p>
  
  <pre><code>DatabaseReference leadersRef = FirebaseDatabase.getInstance().getReference("Leaders");
      Query query = leadersRef.orderByChild("uID").equalTo(mCurrentUser.getUid());
      query.addListenerForSingleValueEvent(new ValueEventListener() {
          @Override
          public void onDataChange(DataSnapshot snapshot) {
              for (DataSnapshot child: snapshot.getChildren()) {
                  if(child.exists()){
                      currentScore = child.child("Score").getValue(Integer.class);
                      Toast.makeText(RunningChallengeActivity.this,"Your current score: " + currentScore,Toast.LENGTH_LONG).show();
                  }
                  if(!child.exists()){
                      Toast.makeText(RunningChallengeActivity.this,"Your current score: 0 ",Toast.LENGTH_LONG).show();
                  }
              }
          }
  
          @Override
          public void onCancelled(DatabaseError databaseError) {
          }
      });
  </code></pre>