A topological version of Hilbert's Nullstellensatz