Only coerce to Option when needed

Fixes #24833.