Added type checking to INSERT