Added type checking on confirmation prompt