Fix bug when RO server NPE when rolled back

An NPE might happen when a RO engine while it does not hold any
partitions. When a client queries this engine, an NPE might happen
since a pointer to an array has not been initialized. Fix is done
by doing extra null pointer checks.