Fixing liststring error when the value is undefined