You should assert it's an expression before casting.