I use object != null
a lot to avoid NullPointerException.
Is there a good alternative to this?
For example I often use:
You have to check for object != null only if you want to handle the case where the object may be null...
There is a proposal to add new annotations in Java7 to help with null / notnull params: http://tech.puredanger.com/java7/#jsr308