title: Check if extras are set or not
body: <p>Is there any way to check if an extra has been passed when starting an Activity?</p>
  
  <p>I would like to do something like (on the <code>onCreate()</code> in the Activity):</p>
  
  <pre><code>    Bundle extras = getIntent().getExtras();
      String extraStr = extras.getString("extra");
  
      if (extraStr == null) {
          extraStr = "extra not set";
      }
  </code></pre>
  
  <p>But this is throwing a <code>java.lang.NullPointerException</code>.</p>
  
  <p>Thank you.</p>