GEOT-4916: improve checks on domain types