Wondering if we could get rid of StateError by altering the API to look like this:

opt.get((value) {
  // the func passed to get is only called if the value is present
  ... do something with the value ...
});

Or is it too weird?