Added helper method for comparing item stacks.