Add mod() method with an Object argument