Never needed it but probably would use Dynamo for this. Read the to/from room values, replace the missing values with a dash or N/A and store it into two new shared parameters. Then schedule those parameters instead.
Also have a look in the IDEAS section if there is already something about this issue or submit your own.
Louis

Please mention Revit version, especially when uploading Revit files.