Also make sure type attribute is present.