Getting NullReferenceException when setting the rotation of my enemy

I’ll be short and concise. Here’s the script:

using UnityEngine;

public class EnemyAI : MonoBehaviour {
	Transform target;
	public float moveSpeed = 3;
	public int rotationSpeed = 3;

	private bool checkPlayerDistance = true;
	private float[] playerDistance = new float[4];
	private bool isReady;

	Transform[] player = new Transform[4];
	
	Transform myTransform;
	
	bool losingHealth;
	
	void Awake()
	{
		myTransform = transform;
	}
	
	void Start()
	{
		target = player [1];
	}
	
	void Update () {

		if (checkPlayerDistance) {
			for(int i = 0; i < 4; i++){
				if(!player *== null){*

playerDistance = Vector3.Distance(player*.position, myTransform.position);*
* }*
* }*
* }*

* if (checkPlayerDistance) {*
* for(int i = 0; i < 4; i++){*
_ if(Mathf.Min(playerDistance[0],playerDistance[1],playerDistance[2],playerDistance[3]) == playerDistance*){
target = player;*_

* if(!isReady)*
* isReady = true;*
* }*
* }*
* }*
* if (isReady) {*
_ myTransform.rotation = Quaternion.Slerp (myTransform.rotation, Quaternion.LookRotation (target.position - myTransform.position), rotationSpeed * Time.deltaTime);
myTransform.position += myTransform.forward * moveSpeed * Time.deltaTime;
* }
}*_

* void OnCollisionEnter(Collision collision){*
* }*
}
Where I get the error is on the part where if(isReady) is, when setting myTransform.rotation. Any guess on what could cause this?

Based on your description, either myTransform or target is null.

Print them both with Debug.Log right before that line and see.