Query equals check for null, dictionary usage fixes
looks like a remnant of sbyte to byte fixes