Use triggerType on Trigger rather than instanceof.