I would try it as is and see what happens. I have an if statement that looks at the parent post and alters the url based on that setting. But I am not altering it if there is not parent post. On the other hand because of other things that I’ve done it is impossible to not have a parent.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users