Added option to getDomain by anything other than ID.

Added option to getDomain by anything other than ID (e.g. name). Compatible.