Prevent crashes when language is passed (bug 1044195)

r? @ngokevin @cvan

Not sure this is the right way to do this.