string type checking if (typeof myVar === 'string' || myVar instanceof String) // it's a string else // it's something else