Added preconditions to the Translator class