code: function validateNode (cost) {
    cost = Number(cost)
  
    if (isNaN(cost)) {
      throw new TypeError(`Cost must be a number, istead got ${cost}`)
    }
  
    if (cost <= 0) {
      throw new TypeError(`The cost must be a number above 0, instead got ${cost}`)
    }
  
    return cost
  }
docs: Assert that the provided cost in a positive number
  
  @private
  @param {number} cost   Cost to validate
  @return {number} cost