Before judging the type of the flex object, the first step is to obtain the object type. The ways to obtain it are as follows:
mx.utils.NameUtil.getUnqualifiedClassName(object:Object):String //Get the object type name
flash.utils.getQualifiedClassName(value:*):String //Get the full name of the object type
Comparison method: I use instanceof and return true/false
Also refer to: