please use `detector == nil`