more rigorous detecting for LineReader

Exception: `LineReader(undefined)`