System.int32 error?

Hi i am getting a little frustrated with this problem that unity is making:
I have 3 different lists all of type Vector2 when the code runs after mousebutton0 is unclicked the script looks at what block is being placed and looks through the list position for that particular block and if it cant find the position in the list it will place the block and add the position to the list but then unity makes an error :

NullReferenceException: Object reference not set to an instance of an object DraggableBlockPlacer.CreateFloor (System.Int32 x, System.Int32 y)

and i legitimately have the exact same line of code for a different type of block and it works fine…

the code:

List<Vector2> flooring, walls, foundation = new List<Vector2>();
    
     private void Update()
    {
            RunCode();
    }
    
    private void RunCode()
    {
    if (width >= 0 && height >= 0)
            {
                for (int xAxis = 0; xAxis < width; xAxis++)
                {
                    for (int yAxis = 0; yAxis < height; yAxis++)
                    {
                        
                        if (blockType == "Foundation") { CreateFoundation(xAxis, yAxis); }
                        if (blockType == "Walls") { CreateWalls(xAxis, yAxis); }
                        if (blockType == "Flooring") { CreateFloor(xAxis, yAxis); }
                        //else { Debug.LogError("No such block type : " + blockType); }
                        //Makes a positive (Bottom left to top right)
                    }
                }
                CodeReset();
            }
    }
    
    private void CreateFloor(int x, int y) 
        {
            
            Vector2 pos = new Vector2(x, y) + originPoint;
            if (foundation.Contains(pos)) //Is there a foundation there?
            {
                Instantiate(block, pos, Quaternion.identity, transform);
                flooring.Add(pos); // < this is the problem?
             }
        }
    
    //Exact same code for foundation
    
    private void CreateFoundation(int x, int y)
        {
            Vector2 pos = new Vector2(x, y) + originPoint;
            if (!foundation.Contains(pos))
            { 
                Instantiate(block, pos, Quaternion.identity, transform);
                foundation.Add(pos);
            }
        }

There’s more to it but its a pretty big code.

Can someone plz help

Okay never-mind that is my fault i placed all the different list names under the same list. my bad :confused: