mongodb lib: added check if db name was actually set in method getDatabase