Cast to AsUntyped for logical binary comparisions between non-bools

This is instead of casting to Dynamic, and is preferred since most
dynamic operations return AsUntyped, and casting from Dynamic to
AsUntyped is a no-op.