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

Closes PR 14564.
How about `(begin (when #f thn els) tst.opt)`