bpf: Add extra path pointer check to d_path helper