How to detect mildew or fungus?
There are many DIY air quality test kits available, that might be the best place to start.  This one checks for bacteria on HVAC filters and vents.  This one from AirLab actually samples the air to test, though it is a bit pricey.

You could also call a professional to come in and test the quality of the air in your home, this can be expensive so I would recommend a cheap DIY test first. If the DIY test shows contaminants or inconclusive results, then I would call in the professionals.

You might want to discuss this with your landlord, as they might be responsible for testing and/or removal of the contaminants (depending on your local laws).