This is like value() but with a fallback in case there's no value set.
This can be used to store any type, with a flag that says if any value is present or not.