Adding attribute support to createType.