[1.10] Fix #13741. Make wrap/unwrap methods optional.