Math type checking