rightIfNull

inline fun <A> Any?.rightIfNull(default: () -> A): Either<A, Nothing?>

Returns Right if the value of type Any? is null, otherwise the specified A value wrapped into an Left.