Question about comparing Object

When I am Trying to put a log of a variable made out of a constructor. The variable is shown as null. Why is that.

I’m sharing code to make you understand.

if (LastSelected.EmojiSprite == CurrentSelected.EmojiSprite)
{
    //Debug.Log("Same Sprite");

    //Debug.Log($"{LastSelected.Row} == {CurrentSelected.Row}  && {Mathf.Abs(LastSelected.Col - CurrentSelected.Col)}");

    if (LastSelected.Row == CurrentSelected.Row && Mathf.Abs(LastSelected.Col - CurrentSelected.Col) == 1)
    {
        HideObject(LastSelected, CurrentSelected);
    }
    else if (LastSelected.Col == CurrentSelected.Col && Mathf.Abs(LastSelected.Row - CurrentSelected.Row) == 1)
    {
        HideObject(LastSelected, CurrentSelected);
    }
    else if (LastSelected.Row == CurrentSelected.Row && Mathf.Abs(LastSelected.Col - CurrentSelected.Col) > 1)
    {
        for (int i = LastSelected.Col + 1; i < CurrentSelected.Col; i++)
        {
            //  Debug.Log($"{LastSelected.row} , {i}");

            ImageClick emoji = new ImageClick(LastSelected.Row, i, LastSelected.EmojiSprite);     
     

             
**//Talking about this log below.**


            **Debug.Log(emoji);**



            Debug.Log(emoji.Row + "::" + emoji.Col + "::" + emoji.EmojiSprite.name);

            if (HideObjects.Contains(emoji))
            {
                Debug.Log("Yes");
            }
        }
    }
}

Don’t create a Monobehaviour using a constructor.
Use AddComponent and call your own function afterwards to initialize it.