How to tell if device can make phone calls?

I have an app with buttons tied to href:tel:[number]. These work fine on devices which are actually phones; but on others it simply does nothing. Ideally i would like the button to either make the call or, if the device is not phone capable, popup an alert with the phone number.

Is there some plugin which will allow me to tell if my device is capable of making phone calls?