In this thread on LAVA, Aristos Queue points out some common usage patterns of the "Not A Number/Path/Refnum?" function that can result in performance problems and/or race conditions. He recommends either (1) comparing a refnum against a null constant value, or (2) trying the refnum operation you were going to do anyway, and using the error output from that operation to determine if the refnum was valid.
I propose a VI Analyzer Toolkit test that checks for this scenario called "Not A Refnum Usage". The test would return a failure under the following circumstances:
The input to the "Not A Number/Path/Refnum?" function is a refnum data type.
The refnum is any type other than Occurrence.
The output of the "Not A Number/Path/Refnum?" function is wired to anything other than a Boolean indicator.
If these conditions are met, the test would return a failure, and would make the two recommendations mentioned above as alternatives to using the "Not A Number/Path/Refnum?" function.