Internally manipulate the terms execution hint as an enum instead of a String.

Close #5530