You can use Device id too. See here How to get the device's IMEI/ESN programmatically in android?
AFAIK, wifi-only devices(Without any SIM support) will return null as id. You need to test it once though.
[EDIT] You can query packagemanager to see if the device has SIM support (or telephony support)
PackageManager pm = getPackageManager();
boolean deviceSupportsSIM= pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY);
You can check PackageManager to see more constants that can help you identify if it's a GSM or a CDMA device, in case you need.
[/EDIT]