this is probably deliberately an `if (str === null || str === undefined)` which I'm fine with writing as `if (str == null)`