Testing if value already exists for autoincrement.