Telling DDR and DDR2 apart is difficult, because the differences are subtle. However, care must be taken because DDR2 will not work in DDR machines and DDR won't work in DDR2 machines. To find out which you have:
DDR (top) is keyed differently from DDR2 (bottom), so you have to determine which you have before you upgrade.