Fixed reference to the primary key in TypeError message.