Improved uniqueness validation