This branch is unreachable. You can't have both `typeof str === 'string'` and `str == null`