Fix is_record tests to check tuple_size before accessing the first eleme...

...nt