Fix mongodb database existance check