fun <R : Any> instanceOrNullByKey(key: TypeKey<R>): R?
Retrieve an optional instance of R by key.
R
key - The type key of the instance.
key
Return An instance of R or null if provider doesn't exist.