Avoid null pointer exception when recording trigger history. Code review: Gregg.