better error throwing for field types not defined