Check for a NULL string in Blueprint

I am using a library that has a method I call from Blueprint that can return a possible error message. Sometimes, it reports that it failed but the error message is NULL. When that happens, I get an exception from the Blueprint when it tries to append that NULL error message to another String.

Is there a node or something I can use to check if a String is null in Blueprints? I know actors have IsValid, is there something similar for the String?

I didn’t see anything, so it maybe that my best recourse is to update the append node to handle NULL inputs without throwing an exception.

Thanks
Eric

Hello Eric,

Check the length of the string, length > zero, then you have a string.

Hope this helps,

I am doing this with an editor script and it doesn’t return 0, it returns “None”, which is > 0. This is when getting folder path though, so that might be special.

IS VALID node checks for empty/null

1 Like

I can’t do a null-check with editor scripting.
Node doesn’t exist for me.

Use ‘Is Empty’ node.

1 Like

Yeah, but does it do it for every type of data? Because I tried it on a ‘name’ type variable and you can’t connect the pin.

1 Like