code: function _validateProductStructure(product) {
    if (typeof product !== 'object') {
      throw new TypeError(product + ' is not an object.');
    }
  
    if (Object.keys(product).length === 0 && product.constructor === Object) {
      throw new Error(product + ' is empty.');
    }
  }
docs: Check if the product data is a valid JS object
  Error will be thrown if type is invalid
  @param {object} product Product JSON object