Have a look at the Serial.available() function. If no data is available then do thing 1 else do thing 2