This is a triple inside a triple:
bool isGeneric = variableA != null ? (variableB != null ? false : true) : (true);
If variableA not null, check the first condition, else will return true. In the first condition, return false if variableB not null and returns true if it is.
You can also translate it into the following if / else statements:
bool isGeneric = false; if (variableA != null) { if (variableB != null) isGeneric = false; else isGeneric = true; } else isGeneric = true;
source share