SERVER-15737 Assert that db is non-NULL before using it, in response to coverity analysis