util: format as Error if instanceof Error