I am also working on migrating to attribute rules and learning arcade. You have to properly filter out the nulls. I do not fully understand but will post some code that someone helped me with that solved the same or a similar problem. The top portion of your code looks good (I think) but you need to do more for potential null returns. I dont know your fields and attributes but this code and description may help you get around your unexpected null issue. Thanks to the ESRI community for helping me with this!
var feature_field = $feature.LOCDESC;
var address = featuresetbyname($datastore, 'situs');
//sets the variable ‘address’ to be pulled from the situs layer//
var closest_address = first(intersects( address, Buffer($feature, 500, 'feet')));
// this is the meat and potatoes of the operation – pulls the first intersecting situs point within 500 feet//
if (closest_address == null)
{
return $feature.locdesc;
}
if (isempty(closest_address.street_name))
{
return $feature[feature_field];
}
//takes care of the null values//
return closest_address.street_no + " " + closest_address.street_pre_dir + " " + closest_address.street_name + " " + closest_address.street_suffix + " " + closest_address.street_post_dir + " " + closest_address.zip_city + " " + closest_address.zip_code
//concatenates address data to LOCDESC field //