- type checking logic for some binary expressions