public function build($options = array()) {

		if (is_string($options)) {
			$options = array(
				'type' => $options,
			);
		} else if (!is_array($options)) {
			$options = array(
				'type' => 'text',
			);
		}

		if (empty($options['type'])) {
			$options['type'] = 'text';
		}

		if (empty($options['data_type'])) {
			$options['data_type'] = 'metadata';
		}

		$defaults = (array) $this->config->getType($options['data_type'], $options['type']);

		$options = array_merge($defaults, $options);

		$classname = elgg_extract('class_name', $options);
		if (class_exists($classname)) {
			return new $classname($options);
		}

		return false;
	}