boolean (@NotNull Exprent headExprent) { if (!(headExprent instanceof SwitchExprent switchExprent)) { return false; } Exprent switchSelector = switchExprent.getValue(); if (switchSelector instanceof InvocationExprent invocationExprent) { if (invocationExprent.isDynamicCall("typeSwitch", 2)) return true; if (invocationExprent.isDynamicCall("enumSwitch", 2)) return true; } return false; }