title: How to check if a child exists in firebase?
body: <p>I have a firebase that has a node called users. The user gives a username and I want to check to see if that username already exists as a child of the users node. This is the code I am currently trying. The platform is android.</p>
  
  <pre><code>String myUsername = userNameInputET.getText().toString();
  if(mUsersRef.child(myUsername) == null) {
  //do stuff
  } else {
  //do other stuff
  }
  </code></pre>
  
  <p>This code is not working, it always goes to the else, even if the child with the given username does not exist. What to do?</p>