const bulkOp = writeCollection.initializeUnorderedBulkOp();
…
if (bulkOp.length > 0) bulkOp.execute();
But for some reason the length property is gone in later MongoDB drivers. So how to properly check if bulkOp contains operations before calling execute? Because simply calling execute on an empty Bulk, throws an error: Invalid BulkOperation, Batch cannot be empty.
However if I cannot check if that Bulk is empty, how can I possibly know? Help