It’s not racist if you can reverse the situation and the races involved to make an acceptable equivalent. So if it was an english cloakroom assistant in pakistan where a pakistani cloakroom phrase perhaps sounded like a stereotyped english name then it’s just a play on words, a pun perhaps.
If, however, you skipped the pakastani qualification in the opening line and said “what do you call a cloakroom attendant” then the punchline would be racist as it implies assignment of a lowly race specific role.
Not racist, medium funny.