Unused code in isValidKey