You should keep the error message here, `appendPath` should always be called with a path, otherwise its better to throw an error to let the developer knows.