Better error when shape type is unsupported.