Check for duplicates.