You don't need the typeof.  Just do (langAlias[keyboardName] || keyboardName)