Map value to a new type or return the encapsulated error.
expected with transformed value or encapsulated error
Function handling the case when value is present.