First you need to find the variable with the null value. Add a println() statement that prints out the value of all the variables on line 49.
When you know what variable, then work of finding why...