Use a cast to know the item type