Fix nil comparison