add tests for and fix Schema#type and idType