[Bugfix] Check class type before casting into a VENTransaction.