getOrNull

@Nullable
open fun getOrNull(role: Int): @Nullable KnownRole

Returns the role as a KnownRole enum, or null if the role is unknown.