AAI: add safety checks / asserts