Check Error Type Python Function Example With Parameters