Added type checking of arithmetic operations