Improve type safety of SROA to enable it on NBA