better record type checks