I\'m guessing I\'m getting this error because the string is trying to substring a null value. But wouldn\'t the \".length() > 0\" part eliminate
null
\".length() > 0\"
You really need to check if the string's length is greater to or equal to 38.