- Fix: check enclosure->type for NULL before using it in a string comparison