allow remove with both string id and object.