PC SDK: How to check if variable is persistent?

Hi,

I was bitten by the fact that RapidData.ValueChanged only works for persistent variables.

(No warning/log/whatnot from the code. Just no output…)
It took me a while to find the fine-print regarding that method

Anyway, I figured I could check if it is persistent or not, and thus warn (or start polling) if not.

The IsTaskPers property seems to check only for TASK PERS vs PERS, not PERS, if I can read the doc right (see below). The last remark muddles things a bit.
Is there any other way I can check for PERS to prevent the same mistake in the future?

Cheers,
/Marcus

"
public bool IsTaskPers { get; }
Checks whether the RAPID data is declared PERS or TASKPERS. Only of interest for persistent data.

Property Value Boolean
true if the RAPID data is declared TASKPERS; otherwise false.

Remarks
Will return false if used with RapidData that is not declared as persistent (but constant for example).
"