Defensive getPath
Defensive getPath