Type checking binary operators