private bool cellIsTypeOf(int row, int col, MinesweeperItemType type, out MinesweeperItem item)
 {
     try{
         //find an item and compare the input type
         //return true if item is not null and the input type is the same of the found item type
         //return fals if the item is null or the input type is not equal to the found item type
         MinesweeperItemCellDefinition adjacentCell = null;
         MinesweeperItem adjacentItem = null;
         adjacentCell = new MinesweeperItemCellDefinition(row, col);
         adjacentItem = findItemAt(adjacentCell);
         item = adjacentItem;
         if (adjacentItem != null){
             return adjacentItem.type == type;
         }
         return false;
     }
     catch (Exception e){
         hanldeError(e);
         item = null;
         return false;
     }
 }
 private bool cellIsTypeOf(int row, int col,MinesweeperItemType type)
 {
     MinesweeperItem item = null;
     return cellIsTypeOf(row, col, type, out item);
 }