public function getPropertyValue($name, $type = null)
{
$this->checkState();
$val = $this->getProperty($name)->getValue();
if (null !== $type) {
$val = $this->valueConverter->convertType($val, $type);
}
return $val;
}