Add a switch statement of selection by type:
case TypeA; ActionA; break;
case TypeB; ActionB; break;
Although if would be nice if switch was more flexible as in some other languages (F#, Swift...), in that case, this is typically a poor design. You should usually either use virtual functions or a visitor pattern for that purpose.