I use object != null a lot to avoid NullPointerException.
object != null
Is there a good alternative to this?
For example I often use:
public static T ifNull(T toCheck, T ifNull) { if (toCheck == null) { return ifNull; } return toCheck; }