Raise ValueError with invalid types in `add`