Remove unnecessary null check in path.h