Changes isUndefined to isNumber when checking to see if a record has a defined item id.