I faced a problem where invisible character \\0 which is pretty like a \'white space\' not considered as white space by the string.IsNullOrWhiteSpace method. I
\\0
You could replace all \0 characters with the space character, and then check for whitespace.
\0
string.IsNullOrWhiteSpace("\0".Replace('\0', ' ');