mongo connection configuration

handle undefined connection parameters