[[ Bug 11684 ]] Moved nil pointer check to relevant method.