title: comparison Integer object with primitive int
body: <p>I am comparing integer object with primitive int but getting null pointer exception if Integer object is <code>null</code></p>
  
  <pre><code>public static void main(String[] args) {
  
          Integer a = null;
          int b = 1;
  
          if (a != b) {
              System.out.println("True");
          }
  
      }
  
  
  Output : Exception in thread "main" java.lang.NullPointerException
      at com.nfdil.loyalty.common.Test.main(Test.java:10)
  </code></pre>
  
  <p>I am getting this because its trying to convert <code>null integer object (a.intValue()) into primitive int</code>. </p>
  
  <p>Is there any other way to avoid this?</p>