Usually when your compiler receives a NullPointerException, it is when you are trying to use a object that points to a null value.