Preventing warning when delegate is set nil