Safeness Index-Based MPC and EMPC