code to check role exists