Added check for nil Role