added helper function for handling uniqueness checks on organization-based models