Sorry, I was not precise enough. I am using my own configuration stored in xml - not through the FG UI configuration.
I found the following Nasal code:
is_helicopter = (func {(var n = props.globals.getNode("rotors", 0)) != nil and n.getAttribute("children")})();
It does the trick sometimes, but e.g. the Saab Viggen fighter jet is also recognized as a helicopter then.
The FG launcher somehow recognizes a helicopter automatically (see lower left icon, when a heli is selected). So there must be some indication somewhere.