Add documentation for isNextAfter