robustify code against null paginationInfo + adjusted edge-case for RTL flow rectangle detection method