`<nitpicking>`
This method is a bit wird. I don't see why it checks the bounds, while other helpers don't. Second, you have two methods to check the bound that need to be in sync (`checkBound == !isEndOfLine(offset)`). And third, it only abstracts over an equality check, and is used only once.
`</nitpicking>`