A slight simplification of create_or_update, which removes a redundant logic operation.