implemented type check for plus