Added empty check to resulting path.