Tester le type de variable JavaScript
if(typeof bar === 'string') {
//whatever
}
CollectiveMind
if(typeof bar === 'string') {
//whatever
}