added checks for null locale in IDict