show err.stack as string when typeof is object