Work around issue in MongoDB driver where the _cursor object can be set to null during a hasNext call if the cursor is closed asynchronously.