(maint): simplify conditional in remove method