updated 'prime_worker.js': more strict work with types