Report error when types are not primitive types in lib definition