Added documentation for checkitem function