Fix a potential NPE in Translator.