Added function type checking in arithmetic expressions