def default_property_value(attr, value)
      if value.is_a?(TrueClass) || value.is_a?(FalseClass)
        send("#{attr.to_sym}=", value) if send(attr.to_sym).nil?
      else
        send("#{attr.to_sym}=", send(attr.to_sym).presence || value)
      end
    end
def default_property_value(attr, value)
      if value.is_a?(TrueClass) || value.is_a?(FalseClass)
        send("#{attr.to_sym}=", value) if send(attr.to_sym).nil?
      else
        send("#{attr.to_sym}=", send(attr.to_sym).presence || value)
      end
    end
Sets a default value for the property if not currently set.

 Example:
   default_property_value :state, 0

 is equivalent to:
   self.state = state.presence || 0

 Example:
   default_property_value :enabled, false

 is equivalent to:
   self.enabled = false if enabled.nil?