Fix comparisons between numbers and nil.