How to stop bullets from colliding with an enemy while it is being destroyed

I have a shotgun script that shoots 5 bullets at once. It should only take 3 of those bullets to destroy the enemy, however all of the bullets are destroyed since they all impact the enemy at the same time before the enemy has a chance to be destroyed. I’ve tried fixing this by adding a isDead bool on the enemy but then I get a NullReferenceException. How would I change my script to make the bullets be able check to see if an enemy is dead without getting the reference error?

Bullet Script:

private void OnTriggerEnter2D(Collider2D other) 
    {
    Health enemy = other.GetComponent<Health>();

    if(dealtDamage || enemy.dead)
    {
        return;
    }
    if(enemy != null)
    {
    enemy.TakeDamage(damage);
    dealtDamage = true;
    }
    
    Instantiate(impactEffect, transform.position, transform.rotation);
    Destroy(gameObject);
    }

Enemy Health Script:

public void TakeDamage(int damage)
    {
        health -= damage;
        
        if (health <= 0)
        {
            dead = true;
            gameObject.GetComponent<Collider2D>().enabled = false;
            Die();
        }
    }

The null reference exception comes because you are probably destroying the enemy in the Die() method, and the bullets are trying to check if that enemy is dead or not but it has been destroyed and no longer exists. I would recommend just deactivating the enemy with gameObject.SetActive(false) or just turning off the collider and playing a death animation, then you could delete it at a later time with a timer or something.