fix when a value is null/undefined/NaN