[DDMD] [refactor] Move Expression::canThrow into visitor class