While checking for null or empty values in the script, there can be issues that this validation isn’t working as expected, and you’re still getting script logs.
One possibility for this behavior is that the field value might be a whitespace string rather than a null value or an empty string. Whitespace strings can sometimes be considered as non-empty, causing the validation to pass.
To handle this situation, you can modify the validation to also check for whitespace strings using the trim() function. Here’s how you can do it:
