make mongodb import only fail if module was enabled

The old code would fail even if pymongo was not installed even if the reporting module was disabled.