Making a player movement/jump script but I am getting an error.

so I am making my very first game in unity and I’m having problems with the jump part of the script.
every time I press spacebar I get this error:
"
NullReferenceException: Object reference not set to an instance of an object
PlayerMovement.IsGrounded () (at Assets/Scripts/PlayerMovement.cs:40)
PlayerMovement.Update () (at Assets/Scripts/PlayerMovement.cs:19)

"

script:

using System.Collections.Generic;
using UnityEngine;

public class PlayerMovement : MonoBehaviour
{
    public float movementSpeed;
    public Rigidbody2D rb;

    public float JumpForce;
    public Transform feet;
    public LayerMask groundLayers;

    float mx;

    public void Update()
    {
        mx = Input.GetAxisRaw("Horizontal");

        if (Input.GetButtonDown("Jump") && IsGrounded()) {
            Jump();

        }
    }

    public void FixedUpdate()   {
        Vector2 movement = new Vector2(mx * movementSpeed, rb.velocity.y);

        rb.velocity = movement;
    }

    void Jump() {
        Vector2 movement = new Vector2(rb.velocity.x, JumpForce);

        rb.velocity = movement;
    }

    public bool IsGrounded() {
        Collider2D groundCheck = Physics2D.OverlapCircle(feet.position, 0.5f, groundLayers);

        if (groundCheck.gameObject != null) {
            return true;
        }
        return false;
    }
}

Hello @TurtlesAreCool
So how you read these errors is the following:

NullReferenceException: Object reference not set to an instance of an object
This is the exception (error) which tells you what went wrong. This specific one means that you are using a variable which contains a null (empty) value.

PlayerMovement.IsGrounded () (at Assets/Scripts/PlayerMovement.cs:40)
The row after the exception is which class, method, file and line this exception happened at. We can see that the exception happened in the PlayerMovement class, IsGrounded() method, in the PlayerMovement.cs file, on line 40 (The :40 at the end is how the log displays line number).

So if we look at line 40 in the PlayerMovement.cs file, we can see the following:
if (groundCheck.gameObject != null)
since there is only one variable on that line, we can conclude that groundCheck is null when this method is called.

groundCheck is assigned on line 38 by the Physics2D.OverlapCircle() method.
If we look at the Scripting API docs for Physics2D.OverlapCircle, we can see that:

Returns
Collider2D The collider overlapping the circle.

If the return value is null, it means that the OverlapCircle method didn’t find any collider overlapping the circle.

I hope this helps!
Best of luck with your future coding endeavours