Check if a string has ANSI escape codes