Cast object instance