Surrounds an expression with a smart cast.