title: I get a NullPointerException when I invoke .equals() on a null String
body: <p>I'm using 1 Activity for multi tasks depends on the intent i pass from the MainActivity. So if i pass "yes" it will show and hide some elements of the View, otherwise it will show the normal activity, but some times the app crash because of NullPointerExepction, and it leads me to the place where i call the intent String, like there's no String passed. So i'm wondring if it's because I'm useing a string instead of boolean or so. What would be the better method for my case? <br/>
  here what i'm using for now:</p>
  
  <pre><code>public String getUserStatus(){
      Intent intent = getIntent();
      isUserLogedin = intent.getExtras().getString("userstatus");
      return isUserLogedin ;
  }
  </code></pre>
  
  <p>and i use this :<br/>
   <code>if(getUserStatus().equals("yes"))</code></p>