fix ToBoolean for objects implementing avoidObjectDetection()