checking if delegate is set