Q:

Check the null values in android edit text

I'm new to Android development and Android Studio, 
so pardon my ignorance.
Here I am trying get values from phone number(editphone) and password(editpassword).So please tell me how to enhance the below code checking null values from the both.
 Signbutton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {

            final ProgressDialog mdialog = new ProgressDialog(signin.this);
            mdialog.setMessage("please waiting...");

            table_user.addListenerForSingleValueEvent(new ValueEventListener() {

                @Override
                public void onDataChange(DataSnapshot dataSnapshot) {

                    if(dataSnapshot.child(editphone.getText().toString()).exists())
                    {
                        mdialog.dismiss();
                        user userobj = dataSnapshot.child(editphone.getText().toString()).getValue(user.class);

                        if (userobj.getPassword().equals(editpassword.getText().toString())) {
                            Toast.makeText(getApplicationContext(), "Sign in successfully", Toast.LENGTH_SHORT).show();
                        } else {
                            Toast.makeText(getApplicationContext(), "Sign in failed", Toast.LENGTH_SHORT).show();
                        }
                    }
                    else
                        {

                        Toast.makeText(getApplicationContext(), "user is not exist", Toast.LENGTH_SHORT).show();
                    }

                }

A:

You can check null values from the both by following code :
Signbutton.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View view) {

        final ProgressDialog mdialog = new ProgressDialog(signin.this);
        mdialog.setMessage("please waiting...");

       if (!TextUtils.isEmpty(editphone.getText.toString.trim()) && !TextUtils.isEmpty(editpassword.getText.toString.trim())) {

        table_user.addListenerForSingleValueEvent(new ValueEventListener() {

            @Override
            public void onDataChange(DataSnapshot dataSnapshot) {

                if(dataSnapshot.child(editphone.getText().toString()).exists())
                {
                    mdialog.dismiss();
                    user userobj = dataSnapshot.child(editphone.getText().toString()).getValue(user.class);

                    if (userobj.getPassword().equals(editpassword.getText().toString())) {
                        Toast.makeText(getApplicationContext(), "Sign in successfully", Toast.LENGTH_SHORT).show();
                    } else {
                        Toast.makeText(getApplicationContext(), "Sign in failed", Toast.LENGTH_SHORT).show();
                    }
                }
                else
                    {

                    Toast.makeText(getApplicationContext(), "user is not exist", Toast.LENGTH_SHORT).show();
                }

            }
            }
            } 

