public function validate($value)
        {
            if (!in_array(gettype($value), $this->types)) {
                throw new Exception('Type of value "'.gettype($value)."' is not compatible with ".get_class($this));
            }
        }