Support conditional serialization following the ShouldSerialize* idiom