added a type check in utils.add