title: I'm getting net.sf.JSONObject can't be cast to java.lang.String Exception
body: <p>I'm reading the <code>JSONObject</code> as input and i am retrieving the value of key "<code>id</code>" using <code>getString()</code> method of <code>net.sf.json</code> API but i'm curious to know why it is not going in the if block..</p>
  
  <pre><code>INPUT:
      {
      "id" : null
      }
  </code></pre>
  
  <p>code:</p>
  
  <pre><code>//reading the jsonObject from String
  JSONObject jsonObject.fromObject(someString);
  String id = jsonObject.getString("id");
  if( id == null)
  {
          //the control is not going in this if condition
  }
  </code></pre>