You shouldn't need a typecast here. Instead, bail out if `readString` returns `undefined`.