Add null check for returned errors in CBN