Improved type handling when performing binary comparisons of TypedObjectNodes