Optimize for ConstValue in assertions