Fix regression when parsing number types in shorthand

We can't call strip() until we know that the object is a string.
This is a regression introduced in the last CLI release.