The transaction can be non-null if, for example, the database is full, in which case we will also call ``AbortTransaction``. But it's such a remote possibility that I don't think we should spend time on fixing it.