Check Error Type Python Function Documentation Example