A Point3d is a struct, so it cannot be null, furthermore IsValid tests for Unset, so you don’t need to do that twice either. Just pt.IsValid gives you the same result as you already have. However an uninitialised point will probably be (0,0,0) rather than Unset.
The Script component treats all inputs as optional so unfortunately it’s hard to detect whether or not you’ve actually got data or whether it was just the default(Point3d) value. You’ll have to disable the type hint (i.e. revert back to object) and then test for null. Afterwards you can test whether the data actually is a point:
private void RunScript(object x, System.Object pt, ref object A)
{
if (pt == null)
{
A = "no data";
return;
}
else if (!(pt is Point3d))
{
A = "pt is not of type Point3d";
return;
}
A = (Point3d) pt;
}