I don't understand why the code doesn't compile due to a NullPointerException. Thanks for your help.