Please copy and paste enough of the error message to identify what line it occurs on.
Look at that line of code and see which variable is null. Then back track to see why that variable is null.