title: Why does this statement not work appropriately? Ternary operation & classcastexception
body: <p>I have a <code>JSONObject</code> which I am parsing and sometimes some of the data is null.</p>
  
  <p>In this case, ReportId = null..so, I tried to use a ternary operator to prevent the <code>ClassCastException</code>, however, it doesn't work.</p>
  
  <p>The specific object throwing the error has <code>"ReportId":null</code>....can I not do this?</p>
  
  <p>Line: </p>
  
  <pre><code>item.setReportId((jsonObj.get("ReportId") != null || jsonObj.get("ReportId") != "null") ? (Integer)jsonObj.get("ReportId") : 0);
  </code></pre>