sval: db: cast parameters to the correct type before saving them in the db