title: Firebase Google Sign in check if User phone Number is empty
body: <p>I am using google sign in for my android application and I want to check if my current user's phone number is empty and then take an action. I tried putting an if statement and it is throwing me null pointer exception. Can someone please help me to fix this issue ?</p>
  
  <pre><code> String userNumber = user.getPhoneNumber();
    mProgressDialog.setMessage("Verifying your phone number information...");
        if(userNumber.isEmpty()) {
            Intent phoneAuth = new Intent(GoogleSignIn.this, 
                                            PhoneAuthentication.class);
            startActivity(phoneAuth);
            finish();
        }
  </code></pre>
  
  <p>This is the error :</p>
  
  <pre><code>08-03 19:09:24.680 29877-29877/com.manali.phonegooglecontacts D/FirebaseApp: Notified 0 auth state listeners.
  08-03 19:09:24.683 29877-29877/com.manali.phonegooglecontacts D/AndroidRuntime: Shutting down VM
  08-03 19:09:24.684 29877-29877/com.manali.phonegooglecontacts E/AndroidRuntime: FATAL EXCEPTION: main
                                                                                  Process: com.manali.phonegooglecontacts, PID: 29877
                                                                                  java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
                                                                                      at com.manali.phonegooglecontacts.GoogleSignIn$1.onComplete(GoogleSignIn.java:132)
                                                                                      at com.google.android.gms.tasks.zzf.run(Unknown Source)
                                                                                      at android.os.Handler.handleCallback(Handler.java:751)
                                                                                      at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                                      at android.os.Looper.loop(Looper.java:154)
                                                                                      at android.app.ActivityThread.main(ActivityThread.java:6688)
                                                                                      at java.lang.reflect.Method.invoke(Native Method)
                                                                                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
                                                                                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)
  </code></pre>