returns the sum of two elements if both are integer, otherwise raise error