Detecting danger in gridworlds using Gromov's Link Condition