JavaScript vom variablen Typ testen
if(typeof bar === 'string') {
//whatever
}
CollectiveMind
if(typeof bar === 'string') {
//whatever
}