Potential NPE when closing a river

When closing the river if the bulk processor has not been initialized, closing the river could throw a NPE.

Closes #82.

(cherry picked from commit b11e48e)