title: NullPointer Exception while getting Reference in Firebase Database
body: <p>I'm trying to fetch data from my Firebase Database. I've initialized a variable called as <code>tData</code>, which has some inputs from my Activity. In which I'm going to fetch data, <code>tData</code> has been publically defined.</p>
  
  <pre><code> tData[10] =getArguments().getString("sLst");
  </code></pre>
  
  <p>I used a <code>toast</code> to check if the contents are empty or not, and they aren't, <code>tData[10]</code> has data, but still during the below operation</p>
  
  <pre><code> DatabaseReference databaseReference4 = firebaseDatabase.getReference("USERS/"+tData[10]+"/sList"); **
      databaseReference4.addListenerForSingleValueEvent(new ValueEventListener() {
          @Override
          public void onDataChange(DataSnapshot dataSnapshot) {
              tData[6]=dataSnapshot.getValue().toString();
  
          }
  
          @Override
          public void onCancelled(DatabaseError databaseError) {
  
          }
      });
  </code></pre>
  
  <p>I get an error saying </p>
  
  <pre><code>NullPointerException,com.google.firebase.database.FirebaseDatabase.getReference(java.lang.String) on a null object reference at **
  </code></pre>
  
  <p>any inputs would be helpful</p>