LPS-33590 fix possible nullpointer when selecting roles