public function isValid( $name, $value = null )
    {
        if( !isset( $this->enums[$name] ) ) {
            return false;
        } elseif( $value === null ) {
            return true;
        }
        return !isset( $value ) || in_array( $value, $this->enums[$name] );
    }