Why coerce to a string if you've already checked for `typeof str === 'string'`?