function _prepareExtension(extension) {
  try {
    return JSON.parse( JSON.stringify(extension).replace(/null/g, "\"\"") );
  } catch (err) {
    return {};
  }
}
/**
 * private _prepareExtension - replace property null to empty string
 * return object with property or empty if extension didn't set
 */
private _prepareExtension - replace property null to empty string
return object with property or empty if extension didn't set
private _prepareExtension - replace property null to empty string return object with property or empty if extension didn ' t set
function _prepareExtension(extension) {
  try {
    return JSON.parse( JSON.stringify(extension).replace(/null/g, "\"\"") );
  } catch (err) {
    return {};
  }
}
function _prepareExtension ( extension ) { try { return JSON . parse ( JSON . stringify ( extension ) . replace ( / null / g , "\"\"" ) ) ; } catch ( err ) { return { } ; } }
private _prepareExtension - replace property null to empty string
 return object with property or empty if extension didn't set
private _prepareExtension - replace property null to empty string return object with property or empty if extension didn ' t set