Judging by the last line, if there's no cache value we will not get a User returned. Instead it will be undefined.
Relatedly, ICache#get should also have undefined as a possible return value: https://github.com/auth0/auth0-spa-js/blob/7a25483e569bf72f0ff1be3eb196077fe16bb7d0/src/cache.ts#L72.
Thanks for raising @wagenet, I'll put a fix in for this as part of #661
Most helpful comment
Thanks for raising @wagenet, I'll put a fix in for this as part of #661