Fix comparison

Fix comparison with undefined.