This commit fixes hang in web workers occuring when sending "undefined" as message value. It is a temporary band-aid until proper structured close is implemented. Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>