reactivate instanceof and add to string cast