Handle changes to boost::optional in newly released 1.56.
To improve compatibility with the proposed std::optional a number of changes were made,
one of which is the removal of the implicit conversion to bool.  As a result, returning
boost::optional as a bool value now fails.  Explicit conversion to bool used for clarity.