Detect if connected battery is rechargeable
The Maxim (was Dallas Semi) DS2711 and DS2712 NiMh chargers include functionality to detect primary (i.e. non-rechargeable) cells. They do this by measuring the internal impedance of the cells, and using that to differentiate between NiMh (lower impedance) and primary cells (higher impedance), as explained in this Maxim Application Note 3388.

The abstract from that AppNote says:


  The DS2711 and DS2712 Loose Cell NiMH Chargers (designed for one or
  two AA or AAA NiMH "loose" cells) detect an alkaline primary cell and
  avoid charging it. This application note characterizes a wide variety
  of used and new cells from a variety of manufacturers and shows how
  the charger ICs can distinguish between NiMH rechargeable cells and
  alkaline primary cells.


Unfortunately for your application, as you can see in that abstract, those Maxim devices are designed for recharging 1 or 2 cells - not your 3-cell design. Options include modifying your design to use only 1 or 2 cells and, if your design needs it, adding a boost converter to match the higher output voltage of 3 cells (assuming the existing 3-cell design has them connected in series) or trying to incorporate the same impedance measurement technique as they use, into your own design (but perhaps check for any patents that might apply, if you do that).