more rigorous detect for LineReader

Exception: LineReader(undefined)