Returns a function that adds/updates property on object