Instead of repeating this work in every case (iteration through sequences of sequences is slow), how about you only check this if the final dtype is indeed a string type. You could also have `_unique_sequence_of_sequence` not return an array, and then you're checking over a much smaller set of values.

But altogether, I'm not sure the validation that a single set of targets has a consistent datatype is necessary. It seems to me too pathological a case to handle.