Added checks to see if a trigger exists.