Added string validation fixed compilation errors