How to automatically add a user to an existing node in Firebase in initial login

I've implemented a workaround in my app for blocking users of their access, however, when I'm trying to login a user on a new device, the app crashes.

This is my database schema (Note: the user I'm trying login isn't on the Blocked users node yet.):

{
  "Blocked Users" : {
    "RCX2HZXIwlSmMHFgDytf1DgZBgi2" : 0
  },
  "User Location" : {
    "latitude" : 37.4035483,
    "longitude" : -122.097715
  },
  "Users" : {
    "RCX2HZXIwlSmMHFgDytf1DgZBgi2" : {
      "Alert Level" : "Medium",
      "Emergency Type" : "Natural Disaster",
      "address" : "Lapaz Tarlac",
      "emergencyNum" : "0981232387346",
      "name" : "Rafael Campos",
      "phoneNum" : "0981233445675"
    }
  }
}

And this is how I detect if the user is blocked:

private int blockUser;
    private void userBlock() {

        if(FirebaseAuth.getInstance().getCurrentUser()!=null){

            final DatabaseReference blockRef = FirebaseDatabase.getInstance().getReference().child("Blocked Users").child(currentUser.getUid());
                blockRef.addListenerForSingleValueEvent(new ValueEventListener() {
                    @Override
                    public void onDataChange(@NonNull DataSnapshot snapshot) {
                        blockUser = Integer.parseInt(snapshot.getValue().toString());
                        if (blockUser == 0){

                        }
                        else if (blockUser == 1){
                            Intent mainIntent = new Intent().setClass(Fingerprint.this, BlockedNotice.class);
                            startActivity(mainIntent);
                            finish();
                        }
                    }

                    @Override
                    public void onCancelled(@NonNull DatabaseError error) {

                    }
                });
        }
    }
}

Is there any way to automatically add the user into the Blocked Users node or am I not doing this correctly?

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum