Issue #1026: Simplify test and move it to statements/swtch
Issue #1026: Fixed by using similar logic to 'if (is ...)'