ensure name and type defined