Modified update-component so that when the fn returns nil, no change occurs.
See #2 for discussion.