switch nearestPath test from === undefined to _.has