I put it in try block, because I'm using MongoClient class. If it not exists then it will go to catch block and will be shown to user as error message.