code: function isValidNode(val) {
    const cost = Number(val);
  
    if (isNaN(cost) || cost <= 0) {
      return false;
    }
  
    return true;
  }
docs: Validates a cost for a node
  
  @private
  @param {number} val - Cost to validate
  @return {bool}