Maybe we should assert and throw a planner error far above this in the function if displayElement is null.