Allinged a bit the mongodb checking.