Avoid javascript error in getIM method

check whether the given language has input methods