I don't think there's a need for the `isinstance` check, it's implicit in the comparison to `"all"`.