fix plan export: min(undef,any) = undef