fixed an NPE in toTrigger

that was easy