title: How to check if an int is a null
body: <p>I have an object called <code>Person</code>.</p>
  
  <p>it has several attributes in it;</p>
  
  <pre><code>int id;
  String name;
  </code></pre>
  
  <p>i set a person object like <code>Person p = new Person(1,"Joe");</code>.</p>
  
  <p>1.) I need to check if the object is not null; Is the following expression correct;</p>
  
  <pre><code>if (person == null){
  }
  
  Or
  
  
  if(person.equals(null))
  </code></pre>
  
  <p>2.) I need to know if the ID contains an Int.</p>
  
  <pre><code>if(person.getId()==null){} 
  </code></pre>
  
  <p>But, java doesn't allow it. How can i do this check ?</p>