title: Porting from one Json to javas org.json.JSONObject, missing keys not acting the same
body: <p>I have code in a method that I ported that now throws JSONException in my newly created java code.</p>
  
  <p>Below does not work as it used to:</p>
  
  <pre><code>    if (theEvent.getString("plugin")== null)
      {
          processNonPluginEvent(theEvent);
          return;
      }
  </code></pre>
  
  <p>I found out using </p>
  
  <pre><code>org.json.JSONObject 
  </code></pre>
  
  <p>behaves differently than it did on my old code using a different JSON library in c#.  The above code always gets caught by an exception.  In my old code if a key didn't exist it would return null.  Do I really have to catch for that exception in the event the key doesn't exsist?  or is there another way I have not yet discovered to tell if my org.json.JSONObject has a key or not in it?</p>
  
  <p>for reference the old c# code looked like:</p>
  
  <pre><code>  if (theEvent["plugin"] == null)
    {
         processNonPluginEvent(theEvent);
         return;
    }
  </code></pre>