Compruebe si el objeto es una cadena Java
Object foo = "";
if( foo instanceof String ) {
// do something String related to foo
}
Thankful Tuatara
Object foo = "";
if( foo instanceof String ) {
// do something String related to foo
}