MissingReferenceException: The object of type 'Transform' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object.

Please help me I do not know how to program I’m having this error and I do not know what to do if someone can help me? And this is the code line

void Awake()
	nav = GetComponent <UnityEngine.AI.NavMeshAgent>();
    controller = GetComponentInParent<Animator>();
    player = GameObject.Find("Player").transform;

i have this problem!

Player is already destroyed but your still trying to playing with.
you have to do is make sure your player is not been destroyed or do a function if the player is destroyed so you will never encountered this problem.