I keep getting NullReferenceException

void OnTriggerEnter2D(Collider2D other)
{
otherTag = other.gameObject.tag;
if (other.gameObject.tag == “Player”)
{
playerScript.EndGame(true);
}

    }

There is an error on the line inside the if statement

@boss2070301 When does the NullReferenceException appear?