Type check documents.py