Fix Coverity issue 1212355

Coverity had informed us that a variable could be null at the point where it
was being dereferenced during code generation.  This inserts a minor check to
make sure that is not the case.  Tested over release/examples and extern/ferguson
with --llvm, as the surrounding code was referencing llvm concepts.