fix bug when set and setx value is undefined or null