ensureNotNull

inline fun <R, E : Exception> ResultBlock<R, E>.ensureNotNull(predicate: Any?, block: () -> E)

If the predicate is null, then throw the exception form the body. This should usually be called in a "result" block.