Add check for internal duplicates on import

Let me know what you think. If this looks OK, I'll write a few tests.
It would be easy enough to add e.g. `date_of_birth`