Remove needless assignment

It is duplicated code.
Support guessing value type from string data