getOrNull

fun <T : Any, GetParams> getOrNull(key: ServiceKey<T, *, GetParams, *>, params: GetParams): T?

Fetches the item for key. If no provider has been registered, returns null. Does not invoke onMiss.