Checking for duplicates.