Fixed misuse of rs.wasNull(). Fixes 2944