'Cross-thread operation not valid: Control 'dgvTables' accessed from a thread other than the thread it was created on.' datagridview code example
Example: javascript check if is array
var colors=["red","green","blue"];
if(Array.isArray(colors)){
//colors is an array
}