Cant quite figure out why Object reference not set to an instance of an object is coming up.

Hi there. i am trying to create a manager for some shelves. for each of the shelves in the scene i want to add it to an array of shelves

here i what i have at the moment

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

public class ShelvesManager : MonoBehaviour
{
    public shelf[] shelves;
    List<GameObject> Slots;


    void Start()
    {
        GameObject[] s = GameObject.FindGameObjectsWithTag("Shelf");
        int numOfShelves = s.Length;

        for (int i = 0; i < numOfShelves; i++)
        {
            GameObject parent = s*.gameObject;*

int children = s*.transform.childCount;*
for (int o = 0; i < children; ++o)
{
Slots.Add(s*.transform.GetChild(o).gameObject);*
}

shelves = new shelf(parent, Slots);
}
}
}
And here is the shelf.cs script.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class shelf : MonoBehaviour
{
public GameObject Parent { get; set; }
public List Slots { get; set; }

public shelf(GameObject parentShelf, List slots)
{
Parent = parentShelf;
Debug.Log(slots);
for (int i = 0; i < slots.Count; i++)
{
Slots.Add(slots*);*
}
}
}
The error i am getting is
NullReferenceException: Object reference not set to an instance of an object
ShelvesManager.Start () (at Assets/_scripts/Shop/ShelvesManager.cs:22)
line 22 is Slots.Add(s*.transform.GetChild(o).gameObject);*
than you for your help.

Line 20:

for (int o = 0; i < children; ++o)

I’m guessing you meant

for (int o = 0; o < children; ++o)

You need to initialize the Slots list with : new List();
You should name variables with: “myVariableName”
And class names with:" ClassName"