public function setType(int $type)
    {
    	if (!in_array($type, [
            self::TYPE_STRING, 
            self::TYPE_NUMBER, 
            self::TYPE_BOOL_TRUE, 
            self::TYPE_BOOL_FALSE,
            self::TYPE_NULL,
        ]))
        {
            throw new LogicalNodeException('Invalid value type assigned.');
        }

    	$this->type = $type;
    }