You should leave out the if statement; it's normal to send messages to nil in dealloc.