Add return type for Tree.set("paths") and Tree.set("path").  Fixes #16097 !strict.   (The main part of the ticket about throwing an error for invalid paths was fixed earlier.)