modified isWhiteSpace(char c) func