Use dyn_cast to be guaranteed with a null pointer when type is incorrect
Fixes #16 for SwitchCase has multiple sub statements