Add na and type functionality to cdb()

"class" is a more correct defintion of the "type" argument. However, it
cannot be used due to class(). "data.class" is a bit long.