Catch a null pointer exception