title: Firebase unable to access data with "snapshot"
body: <p>I'm writing a web application that uses Firebase, and reading information from the database structured like the following:</p>
  
  <pre><code>"user" : {
  "-KcNmMmqbSvmVXx2vn4A" : {
    "email" : "firebase@firebase.com",
    "firstname" : "fire",
    "membership_tier" : 1,
    "session_count" : 0,
    "surname" : "base"
  }
  </code></pre>
  
  <p>I'm attempting to read the number of sessions the user has undertaken - however no results are being returned.</p>
  
  <p>What I've tried so far:</p>
  
  <pre><code> firebase.database().ref('/users/' + uid).once('value').then(function(snapshot) {
     var sessionCount = snapshot.val().session_count;
   });
  </code></pre>
  
  <p>Currently <code>snapshot.val()</code> is returning <code>null</code>. I'm getting an error stating: </p>
  
  <blockquote>
    <p>Uncaught (in promise) TypeError: Cannot read property 'session_count' of null</p>
  </blockquote>
  
  <p><code>uid</code> has been defined, and therefore no issue should be had with accessing the user's information.</p>
  
  <p>Any pointers would be massively appreciated!</p>