Null check the result of readLine