We end up having to `parseInt` anyway in the upgrade case, but let's go with `typeof` if it's faster for the common non-upgrade case.