title: How to know if specified object in ArrayList is null?
body: <p>I want to know if an Object in an ArrayList is null. If it's null, then it shouldn't do anything. Example:</p>
  
  <pre><code>if(!(theList.get(theIndexofObject) == null)){
     do something...
  }
  else{
     do nothing...
  }
  </code></pre>
  
  <p>This doesn't work, because it throws an exception cause of the '.get()'-method. Any ideas to solve this problem?</p>