Check for duplicate keys