Coerce primary key criteria if type is integer or string.