dont use undefined value in compare