prevent NPE when a invalid role is assigned