Convert threwValue check to boolean expression