allow mongoose.connection.db
to be undefined
#14797
Merged
mongoose.connection.db
to be undefined
#14797