You can test this, for example warrior :
-- is this talent's tier unlocked?
if ( ((tier - 1) * (TalentFrame.pet and PET_TALENTS_PER_TIER or PLAYER_TALENTS_PER_TIER) <= tabPointsSpent) ) then
tierUnlocked = 1;
else
local _, englishClass = UnitClass("player");
if englishClass == "WARRIOR" then
tierUnlocked = 1;
else
tierUnlocked = nil;
end
end