Type checking concatenation expressions