Useful when deserializing an Option Response but working with Candid's subtyping rules.
Candid's rules state that an Option with a non-null value can be sent as the value itself without the Option wrapping it.
This function makes that check for you and returns the Option type even if the value is sent by itself for the consistency.