Fix exception on Internet Explorer when adding first transcript language

Internet Explorer throws an "Invalid arguement" exception when uses an empty string as the parameter in ```namedItem``` method.
As other browsers returns ```null``` when the parameter is an empty string, it is safe to first test whether the parameter is an empty string, and if not then the original code is executed.