We cannot assert(sv) since sv can be validly null
(see the top of the function), but we can test it.