Add code to handle when the test expression is neither true nor false.

Closes PR 14564.
Much better, should do this programming thing when I'm more awake.