NullReferenceException: Object not set to an instance of an object

I keep getting a NullReferenceException error on line 26 of this code:

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class LookAt : MonoBehaviour
{
    private Vector3 target;
    public GameObject player;
    private Vector3 pos;

    FieldOfView fov;

    void Start()
    {
        //store the fov component in a variable
        fov = player.GetComponent<FieldOfView>();
        target = new Vector3(1, 0, 0);
    }
    
    void LateUpdate()
    {
        //if the array of visible targets contains something
        if (fov.visibleTargets != null) 
        {
            //set the target to the result of the FindClosestTarget algorithm
            target = FindClosestTarget(fov.visibleTargets).transform.position;
            //use some weird math to set the lookatposition in the spot of the closest target
            pos = 2 * this.transform.position - target;
            pos = new Vector3(pos.x, pos.y + 1, pos.z);
            //rotate the head to lookat the lookatposition
            transform.LookAt(pos);
        }
    }

    Transform FindClosestTarget(List<Transform> targets)
    {
        Transform bestTarget = null;
        float closestDistanceSqr = Mathf.Infinity;
        Vector3 currentPosition = transform.position;

        //run through each transform in the array
        foreach (Transform potentialTarget in targets)
        {
            //Find the direction to target
            Vector3 directionToTarget = potentialTarget.position - currentPosition;
            //find the distance to target
            float dSqrToTarget = directionToTarget.sqrMagnitude;
            //if this is the closest transform, set it as the best target
            if (dSqrToTarget < closestDistanceSqr)
            {
                closestDistanceSqr = dSqrToTarget;
                bestTarget = potentialTarget;
            }
        }
        return bestTarget;
    }
}

Change LastUpdate() to this

void LateUpdate()
{
    //if the array of visible targets contains something
    if (fov.visibleTargets != null) 
    {
        // FindClosestTarget returns a Transform not a Vector3
        // if the result of FindClosestTarget is not null get the target position and process
        Transform closestTarget = FindClosestTarget(fov.visibleTargets);
        if (closestTarget != null)
        {
            //set the target to the result of the FindClosestTarget algorithm
            target = closestTarget.position;
            //use some weird math to set the lookatposition in the spot of the closest target
            pos = 2 * this.transform.position - target;
            pos = new Vector3(pos.x, pos.y + 1, pos.z);
            //rotate the head to lookat the lookatposition
            transform.LookAt(pos);
        }
    }
}