For calling from polymorphic code that doesn't know whether it needs the value pointer for read or replace, or whether it has a const pointer or not. Must be called on a non-null pointer to an optional. If called on an unset optional, will return null.