GetData flag when no input is detected?

Sorry a dumb question. How to detect when there is no geometry being feed into an input (eg. a Mesh)
In grasshopper, the component will turn orange and say something like “input mesh fail to collect geometry”

But in my code the bool GetData<Mesh> not really returning anything when I try to print it out
if there is an input it returns True, but it doesn’t return False when there is no input.
is there another function that can help me detect when an input is missing

you need to make that parameter optional, e.g.

protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
            pManager.AddAngleParameter("A", "A", "", GH_ParamAccess.item);
            Params.Input[0].Optional = true;

and GetData would return false.

Oh yeah, you’re right. After I make the input optional
the DA.GetData bool works great and can now show me if input is null.
That’s interesting.