Check if player is in class

How can I check the player’s current class?
image
IT’S JUST A PREVIEW OF WHAT I MEAN TO DO, IT DOESN’T WORK!
So, the code I made is suppost to pick random player then check if that player is already a “killer” if it’s true, then it does nothing, but if player is not a killer then it gives him the killer class
Shortly, I need help with checking the player’s class