Null refrence exception on an object that was just instantiated

Not Sure why I am getting a null reference exception here I have used this exact line many times and yet for some reason this is giving me a null reference exception now, did something change recently with unity that would cause this to give me a problem?

if (ptsText)
    {
        TextMesh myPtsText = (Instantiate(ptsText, this.transform.position, this.transform.rotation) as TextMesh);
        myPtsText.text = "+ " + pointValue;

    }

this is done in the outofHP function and for some reason it will instantiate the text gameobject but it then immediately breaks on the setting of the text line right after
I am basically asking if something has changed to make this not possible because I am 100% sure I have used this exact line before.

I have checked the prefabs and the objects while the game is running and everything is properly hooked up in the inspector.
Also here are the declarations for ptsText and pointValue.

    public TextMesh ptsText;
public int pointValue = 0;

is ptsText a prefab?

Instantiate() is used to instantiate GameObjects, while TextMesh is a Component.

instead, do

public GameObject ptsText;

then

if(ptsText) {
    TextMesh myPtsText = (Instantiate(ptsText, this.transform.position, his.transform.rotation) as GameObject).GetComponent<TextMesh>();
     myPtsText.text = "+ " + pointValue;
}