function isPrimitive(value) { return !(value instanceof Object); } alert( isPrimitive( new String( "h" ) ) );