TMPro check

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class Codes : MonoBehaviour
{
    [SerializeField] TextMeshProUGUI CodeText;
    public GameObject JE2012Info;
    void Update()
    {
        if (CodeText.text == "JE2012")
        {
            JE2012Info.SetActive(true);
        }
    }
}

It being a bad practice aside (comparing strings is expensive), I think this should world. Does it give you an error?