Checking for duplicate records.