Bug 1016862: Fixes issue with trying to access nil attribute.
Merge pull request #3132 from ehelms/bug-1016862

Bug 1016862: Fixes issue with trying to access nil attribute.