Updates the objective in the given slot to be the given objective, clearing the objective at the given slot if the given objective is null.
the objective, null to clear
the slot