properly check for empty transactions array