If you're purchasing an iPhone from Apple that is unlocked, it's safe! On the other hand, buying an iPhone from an unauthorized vendor that claims the phone is "factory unlocked" does carry the risk that the device will be unsafe or not legitimately unlocked.