fix nil comparison