Added type checking to schema inference

༽΄◞ิ౪◟ิ‵༼