Add test for type; remove legacy object sanitizing code