Add support for Heroku
Do not crash if no docs are returned