RDS: cleanup: remove "== NULL"s and "!= NULL"s in ptr comparisons