simplified code: irules always contain the 'type' key after they are created, no need to check for it