Fix issue #341 where falsey values in iteration break getPath