Added a test for a NullPointerException