Added magic methods __add__ and __sub__
Replaced isinstance() with duck typing