Move Expression::canThrow into visitor class