When retrieving the values for pyomo objects, you can handle exceptions with a flag. For uninitialized variables, this works as expected, and None is returned. However, for