Forgot type check in the add method.