added a return check for setItemGroupType().