add null error skipping logic