don't crash if the bson has no data (like bson_init() and bson_finish())