Can user UUID be null?
No, cannot be empty.
You can generate one with
$uuid_service = \Drupal::service('uuid');
$uuid = $uuid_service-&gt;generate();

If you use User::create it will automatically generate one for you.
Drupal\user\Entity\User::create([
  'uid' =&gt; $uid,
  'name' =&gt; '$user_name,
  'mail' =&gt; $email,
  'roles' =&gt; [],
  'pass' =&gt; [
    'value' =&gt; $hashed_drupal_7_password,
    'pre_hashed' =&gt; TRUE,
  ],
  'status' =&gt; 1,
])-&gt;save();


Rather than code it from scratch. The proper, Drupal way, to migrate is
using all of these:

core's migrate
migrate plus
migrate tools

I suggest your read this article A Quick Guide to Migrating Drupal Content from D7 to D8 which goes over how to migrate users and other scenarios.