Added string type check for serial data.