On the orbital stability for a class of nonautonomous NLS