             }
         }
 
-        private function cleanObject(o:*):* { 
+        private function cleanObject(o:*):* {
+            if (o == null) {
+                return null;
+            }
             if (o is String) {
                 return o.split("\\").join("\\\\");
             } else if (o is Array) {

                    }
                }
            } catch (e: Error) {
                log('error', e.getStackTrace());
            }
        }


                ExternalInterface.addCallback("nc_setClient", onSetClientCalled);

            } catch (e:Error) {
                log("error", e.message);
            } finally {}
        }

