On the topology of contours of d-dimensional functions