don't crash when mongo isn't running.
Merge pull request #1993 from Pomax/mongofix

don't crash when mongo isn't running.