Code cleanup around checking a for 'not nil'

Just some basic code clean-up that was noticed in a code review.  Doesn't fix a defect, but makes the code read a little smoother.