On the stability of the optimal value and the optimal set in optimization problems