Checking for the stream end