title: Is there any chance DataSnapshot value is null?
body: <p>I am answering <a href="https://stackoverflow.com/questions/41449206/how-do-i-rework-these-firebase-valueeventlisteners-to-be-readable/41455060#41455060">this question</a> then this new question come to my mind.</p>
  
  <p>In that question, I describe my example code like this:</p>
  
  <pre><code>boolean firstCallDone = false;
  boolean secondCallDone = false;
  
  DataSnapshot firstDataSnapshot = null;
  DataSnapshot secondDataSnapshot = null;
  
  onCreate() {
      firstRef.addListenerForSingleValueEvent(new ValueEventListener() {
          @Override
          public void onDataChange(DataSnapshot dataSnapshot) {
              firstCallDone = true;
              firstDataSnapshot = dataSnapshot;
  
              if (firsCallDone &amp;&amp; secondCallDone)
                  doSomething();
          }
          ...
      }
      secondRef.addListenerForSingleValueEvent(new ValueEventListener() {
          @Override
          public void onDataChange(DataSnapshot dataSnapshot) {
              secondCallDone = true;
              secondDataSnapshot = dataSnapshot;
  
              if (firsCallDone &amp;&amp; secondCallDone)
                  doSomething();
          }
          ...
      }
  }
  
  doSomething() {
      // do something with firstDataSnapshot and secondDataSnapshot
      ...
  }
  </code></pre>
  
  <p>The purpose of above code is to execute <code>doSometing()</code> after two Firebase Database has been called and its values gotten.</p>
  
  <p>Then I realize, instead of validating like this <code>if (firsCallDone &amp;&amp; secondCallDone)</code>, I can validate it like this <code>if (firstDataSnapshot != null &amp;&amp; secondDataSnapshot != null)</code>. That is because as far as I know, DataSnapshot <em>never</em> null (after its value has been filled inside <code>onDataChange()</code>).</p>
  
  <p>But I am not sure. Is there any chance that DataSnapshot be null inside <code>onDataChange()</code>? If there is, what is the case that make it happen?</p>