Explanation
If a page is not attached to a document, it does not have a page number. So we cannot return a "normal" number.
At the moment, we return -1.
However, callers (users of the library) might not be careful with error handling.
For this reason I suggest to change the behavior to return None.
Pro returning None compared to using -1:
- It makes intuitive sense what it means
- It is part of the type annotation and mypy will complain about it if you don't handle that
See #2010