By teranex: Fixed bool2string() to handle optional values.
Version 3.5.1-dev build 94.