title: Why do I get a NullPointerException when comparing a String with null?
body: <p>My code is breaking on the following line with a nullpointerexception:</p>
  
  <pre><code> if (stringVariable.equals(null)){
  </code></pre>
  
  <p>Previous to this statement, I declare the stringVariable and set it to a database field.</p>
  
  <p>In this statement, I am trying to detect if the field had a <code>null</code> value, but unfortunately it breaks!</p>
  
  <p>Any thoughts?</p>