Add check for existing key index in table