improve name uniqueness validation