improvement: created nitro_is_trap_set and updated points of use