You can probably do this check before starting a transaction?