protected function validateIndex($index, $indexType) {		
		if (is_null($this->resultMap)) {
			//find index column on given result
			if (!array_key_exists($index, $this->columnTypes)) {
				if (is_numeric($index) && array_key_exists(intval($index), $this->columnTypes))
					$index = intval($index);
				else
					throw new \UnexpectedValueException("Index column '$index' not found");
			}
				
			//get index type
			$indexColumn = $index;
			$indexType = is_null($indexType) ? $this->columnTypes[$index] : $indexType;
				
			//obtain index type handler
			$indexTypeHandler = $this->typeManager->getTypeHandler($indexType);
				
			if ($indexTypeHandler === false)
				throw new \UnexpectedValueException("Unknown type '$indexType' defined for index '$index'");
		}
		else {
			//find index property
			if (!array_key_exists($index, $this->properties))
				throw new \UnexpectedValueException("Index property '$index' was not found in result map");
				
			//obtain index column and type handler
			$indexColumn = $this->properties[$index]->getColumn();
			$indexTypeHandler = $this->typeHandlers[$index];
		}
		
		return [$indexColumn, $indexTypeHandler];
	}