Optimized error handling and accounted for return NotImplemented instead of raise NotImplemented
Using __mul__() instead of *.