Fixed nil comparison