Try to parse a string to any type