adding production checks for the mongo db connection