[error] Object reference not set to an instance of an object

I am trying make enemy chase after player when the player enter its range. But the error occur with PlayerController instance. What is causing this error?

void EnemyAttack()
    {
    
        if (playerIsEnter == true)
        {
            Vector3 playerDirection = PlayerController.instance.transform.position - transform.position;

            theRB.velocity = playerDirection.normalized * moveSpeed;
            if (timeBtwShots <= 0)
            {
                Instantiate(bullet, firePoint.position, firePoint.rotation);
                timeBtwShots = startTimeBtwShots;
            }
            else
            {
                timeBtwShots -= Time.deltaTime;
            }
        }
    }
public class PlayerController : MonoBehaviour
{
    public static PlayerController instance;

    [SerializeField] private float moveSpeed = 3.0f;
    [SerializeField] private float jumpForce = 2;
    [SerializeField] private float topSpeed = 3.0f;

    [SerializeField] private int playerHp = 10;

    public LayerMask groundLayers;

    private Rigidbody rb;
    private CapsuleCollider col;
    private Transform playerTransform;

    float h;
    float v;

    void Start()
    {
        rb = GetComponent<Rigidbody>();
        col = GetComponent<CapsuleCollider>();
        playerTransform = GetComponent<Transform>();

        playerTransform.rotation = Quaternion.AngleAxis(90, Vector3.up);
    }

    void Update()
    {
        h = Input.GetAxisRaw("Horizontal");
        v = Input.GetAxisRaw("Vertical");

        //左向く
        if (Input.GetKeyDown(KeyCode.A))
        {
            playerTransform.rotation = Quaternion.AngleAxis(-90, Vector3.up);
           

        }

        //右向く
        if (Input.GetKeyDown(KeyCode.D))
        {
            playerTransform.rotation = Quaternion.AngleAxis(90, Vector3.up);
           
        }
       
        //Jump
        if (IsGrounder() && Input.GetKeyDown(KeyCode.Space))
        {
            rb.AddForce(Vector3.up * jumpForce, ForceMode.Impulse);
        }
    }
}

Error says it. instance has nothing inside it. You’ve defined your static PlyerController instance. But you have never said what is it. Use for example:

void Awake()
{
    if(instance == null) instance = this;
}

I see, thanks.