more header and type checks