> Besides using *IDN? query , (which can be slow), is there any other faster method to test the presence of the device ,
It depends on what interface is used.
When using GPIB, USB, and TCPIP INSTR (VXI-11), just sending a command without requesting any response data can check the actual connection. For example, *CLS is one of less-impact command for an instrument if it is SCPI-based. VISA will raise a "no listener error", "bus error", or "connection lost error" if the instrument or the cable connection is corrupted, so you can detect the fact then. If you need, set minimal I/O timeout for the purpose as the VISA default is 2000ms.
When Serial and TCPIP SOCKET, just sending a command can not check the actual connection, because they are one of "no-handshake-protocol" architecture. In this case, VISA will not raise any error when viWrite() even if the instrument is not ready. You will have to post a query and check if its response can be sent back.
> or at least the validity of the VISA session?
It may or may not be enough to check VISA session handle for the purpose. For some interfaces, serial and NI-GPIB, viOpen() will success even if the instrument is not ready or not connected. Also, when the instrument gets newly corrupted after successful viOpen(), the app program can't detect the fact by checking the existing VISA session because it is simply a LONG value of your app variable.