بحث: defensive logic