Replace isValid(Object) to isValid(String)