add `Document.isNewLine` with test