add logic to prevent path.resolve from being called with a non string argument.