check if there are ops in transaction before committing