Handle no language being given

The given language were being split on - but when not giving a language
it will be undefined and lang.split will throw an error.