Player Class API for Whispering

Is there a way for the API to determine a players class before creating a list or a whisper to them? I’m developing an addon for whispering poeple who are asking for their lock boxes to be unlocked. It creates a list right now. I still have to scroll to see if that player is a Rogue because they are also shouting to unlock lock boxes. I haven’t found anything to support player class but I was wondering if I’ m over looking something. This is my first robust addon.

locClass, engClass, locRace, engRace, gender, name, server = GetPlayerInfoByGUID(“guid”)