This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Welcome to the Ranch. Is this the same problem as you posted on the intermediate forum? Please don't post the same question twice. See what Fred Rosenberger has already told you. All those if something == null blocks look like a fruitful source of errors.