Cannot access sprite of a gameobject

I am making a character selection script (similar to super smash brothers).

When the player presses Start on the controller, I instantiate a “Player1” object. When they pick a character, I would like the Player1 object to render that character’s sprite. I saw a lot of other people have asked and had this question solved, but I think I’m making a silly mistake somewhere.

var p1;

function Update(){
     if ( Input.GetButtonDown("Start_1") && GlobalHandlerScript.player1Joined == false ){
         //set the "player1Joined" variable
	     //instantiate player
	     p1 = Instantiate(GlobalHandlerScript.player1);

    if ( Input.GetButtonDown("A_1") && GlobalHandlerScript.player1Joined == true ){
          //find the object they selected, make it their sprite
          Debug.Log("searching for object");
          var selected = GameObject.Find("Fire Wizard");
          Debug.Log("found object, searching for sprite");
          var p1sprite = selected.GetComponent(SpriteRenderer).sprite;
          Debug.Log("found sprite, assigning sprite");
          p1.GetComponent(SpriteRenderer).sprite = p1sprite; /*BREAKS HERE*/
          Debug.Log("assigned sprite");

It breaks with a NullReferenceException: Object reference not set to instance of an object.

It breaks directly after saying “searching for sprite” but before saying “found sprite”, meaning it’s breaking at the assignment of p1sprite. Could someone explain exactly what’s causing the Null Reference Exception?

Do the GameObject found and P1 both have a SpriteRenderer?

That’s the most obvious null reference here.