More robust data type inference