If the contacts of the cordless power tool, battery or charger are dented or corroded then they may not connect properly. The battery may still work but its performance will be reduced.
If your battery or charger receives a large knock, it is advisable to get it tested by a merchant or the manufacturer and you may have to replace it. Internal damage may not be noticeable but could be a fire hazard. Remember that NiCd batteries are tough and will survive being dropped from a small height whereas Li-ion batteries are much more fragile.
If a nickel-based battery is warmed above room temperature after a couple of hours of trickle or float charge then the charger is not performing correctly and is overcharging the battery. The charger can probably still be used but the batteries will need to be removed as soon as they have finished the absorption stage.
If Li-ion batteries get warm at any point there is something wrong with the microprocessor in the battery or charger and they should be replaced.
If your battery or charger gets wet, dry it thoroughly in a warm place (although not on top of the radiator as it can get too hot). Afterwards, it is advisable to get it tested by a merchant or the manufacturer and you may have to replace it. Water can short circuit the device and cause permanent damage.