[master] Tighten type check in domain

Fixes #15 Check that `domain[2]` is `str` because in some cases it's an
`int` and `list` operations don't work on `int`s.