Fix issue #990 where a missing `type` attribute

causes problems with `field_get` call due to
the ID column having type None by default.