check types in arithmetic operators