Using ISNULL with the variable to filter out NULL values will solve this issue. In your case add ISNULL(Adrart) to the Bad rows output and move bad rows output row at the top so that it gets executed first.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)