Fix buildIDType when there is an empty domain
Previously, sources which had no domain (e.g. QBO) would result in IDs in that appeared like '{-##}'.  This change will return $ID directly if the domain is empty.