add a method to determine whether evaluation of a constant can trap.