What you are doing is a good way to accomplish this. The main modification is you need to do is get the error number it returns after the call. So....
SetBreakOnLibraryErrors (0);
error = GetPanelAttribute (MyHandle, ATTR_VISIBLE, &value);
SetBreakOnLibraryErrors (1);
If error > 0 then you know that the Panel is not loaded. Not that the SetBreakOnLibraryErrors(0)command will turn off the CVI error messages around this call so that your program can continue to run.