Empty string replacement

The goal of this is in the case there is a property with an empty string then this will make reading it in the DAQS Assist a bit easier. If you are using assemblyCode in the Error message then instead of seeing nothing you will see: "NO CODE"

(
    "assemblyCode": $string($getSym(parent.id).values.assemblyCode) = "" 
                      ? "NO CODE" 
                      : $getSym(parent.id).values.assemblyCode,

    /* incontext */

  $getSym := function($id){ $$[type = "FamilySymbol" and id = $id and $string(values.assemblyCode) ~> /^(?!((13|17|21|22|23|24|27|31|32|33|37|90)(\.\d{1,2})?$)|(28\.1\d?|43\.1\d?|52\.0|52\.3|62\.1\d?|61\.4)$|(61\.2[47])$)/i] };
  $getFam := function($id){ $$[type = "Family" and id = $id][0] };

  $[type = "FamilyInstance" and (
      $sym := $getSym(parent.id);
      $fam := $getFam($sym.parent.id);
      $fam and $match($fam.name, /^NLRS/))].{
    "id": id,
    "type": type,
    "name": name,
    "familyTypeId": parent.id,
    "familyTypeName": $getSym(parent.id).name,
    "assemblyCode": $string($getSym(parent.id).values.assemblyCode) = "" 
                      ? "NO CODE" 
                      : $getSym(parent.id).values.assemblyCode,

    "familyName": $getFam($getSym(parent.id).parent.id).name
  }
)