database: only destroy user bson_t if it has been set.