check environment variable for MongoDB connection