This should be based on the specific type.
Object should not be converted directly unless you define your own method to judge and convert it into a normal String
For int, you can use Ineger.parseInt(String a); and other specific types have corresponding methods.