Added uniqueness utility function.