public function filterVar($var) {
        $response = NULL;
        if (is_bool($var)) {
            $response = $var;
        } elseif(is_int($var)) {
            $response = $var;
        } elseif(is_float($var)) {
            $response = $var;
        }
        if($var != 'null') {
            if(is_string($var)) {
                $response = filter_var($var, FILTER_SANITIZE_SPECIAL_CHARS);            
            } elseif(is_array($var)) {
                $response = array();
                foreach ($var as $key => $value) {
                    if(is_array($value)) {
                        $response[$key] = $this->filterVar($value);
                    } else {
                        $response[$key] = filter_var($value, FILTER_SANITIZE_SPECIAL_CHARS);
                    }
                }
            }
        }
        return $response;
        
    }