Pickling fix for primitives.If