Replaced ctxt.EvalOptionalExprAs<Type> with ctxt.EvalExprAs<Type> where necessary