From ESOUI Wiki
This function returns true if the current player-character can be affected by Enlightenment, or false otherwise. Even after the player unlocks Enlightenment, only their Level 50 characters can benefit from it.
if IsEnlightenedAvailableForCharacter() then d("Your character can be enlightened. You're gonna earn so much XP!") end