Changed the behaviour of DatatypeId to throw an exception when
encountering an unknown datatype, instead of just logging an error.