title: Next.js redirect if there is no cookie
body: <p>Is there a way to redirect the user from checkout to the join page ONLY if there is no cookie <code>user_token</code>. Next.js allows to set only strings and undefined as <code>value</code>, but I need to validate that there is no cookie:</p>
  <pre class="lang-js prettyprint-override"><code>  redirects: async () =&gt; [
      {
        source: '/checkout',
        has: [
          {
            type: 'cookie',
            key: 'user_token',
            value: '',
          },
        ],
        permanent: true,
        destination: '/join',
      },
    ],
  </code></pre>
  <p>I tried to use regex for empty string, but it did not work:</p>
  <pre class="lang-js prettyprint-override"><code>  redirects: async () =&gt; [
      {
        source: '/checkout',
        has: [
          {
            type: 'cookie',
            key: 'user_token',
            value: '(^$)',
          },
        ],
        permanent: true,
        destination: '/join',
      },
    ],
  </code></pre>