fix IE issue "doesn't support 'replace'" for [] value

fixes issue "Object doesn't Support Property or Method 'replace'" on IE 7 (and 8?) if Array is []. If using "for in" loop over [] in IE, then there is also an empty {} that is member of [] (prototype):
for (var i in []) {
    // outputs {} on IE
    console.log(i);
}