Added search_fqdn_optional function