Clear String variable..

while(Serial.available())  //while serial data is available
  Serial.read();  //read it and throw away what has been read

Note the comments that I have added. The code does not change the value of any variables