Add test for type validation