avoid calling write_attribute with blank attribute (for models with inheritance_column nil)