Java tutorial
//package com.java2s; public class Main { /** * @param object * @return */ public static final boolean isObjectNull(Object object) { try { if (object != null) { return true; } else { throw new NullPointerException(); } } catch (NullPointerException ne) { ne.printStackTrace(); return false; } } }