Fixed NullPointerException and added assertFalse