report prefered audio device is missing

Fixrobert's icon

Hello,
I've made a preference file for my patch, with a few parameters, all bounded to pattr object.
They are all recalled when the patch is opened by automaticily reading a pattrstorage file.
with an adstatut-driver linked to a menu (wich is bounded to a pattr object) I can recall my prefered audio-device.
I wonder how I could tell Max to detect if the device stored in the pattr object is missing and report it to the user.
same question with a Midi device.
any help would be much appreciated.
thank you