Sanity check for nullpointerexception