Replace `if` statements with `ok` in `readLine`.