isset($transaction) → $transaction !== null