This depends on whether you need to detect if NI-CAN software is installed, or detect if a card exists.
To detect if NI-CAN is installed, you can look in the Registry under HLM\Software\National Instruments\NI-CAN. If this does not exist, NI-CAN is not installed.
Assuming NI-CAN is installed, you can detect if a given interface exists by calling ncConfig with some simple attributes. Be sure to set the Start On Open attribute to False. If ncConfig returns success, the interface exists. If ncConfig returns an error, the interface does not exist.