modify color check for empty text