How could you tell if a compound consistd of ions if it does not dissolve in water?

Melt it and see if the molten salt conducts electricity.