assertNotNull

fun <T> assertNotNull(instance: T?): T?

Asserts that the given object isn't null, throwing an AssertionException if it was. This logs an assertion with ReactSoftExceptionLogger, which decides whether or not to actually throw.