You could test for the presence of chitin, which is a fundamental component of fungal cell walls. There is precedent for this: <
Chitin is not only present in fungi though, it is also fundamental to insect and crustacean exoskeletons, and the occasional plant species (e.g. Aegagropila).