Added validation for role duplication.