Fix error reporting in Expansion algorithm.
Value of @type must be an IRI.