Add a `if` check to test if the category actually exists before updating the category.