adds missing explicit conversion to bool of optional

Missing explicit conversion to bool caused Boost.MPI to fail to compile
with C++ > 11.