can we do `if (!result || result.length === 0) {`