getOrNull

fun <T> Registry.getOrNull(registryKey: RegistryKey<T>): T?(source)

Retrieves value by this registryKey or returns null if no association is present.