Fix crash when invalid input was provided to ragged_tensor_to_variant
Thanks @cantonios . The PR has been updated. 

In the past I did notice that internal tests may have different error codes. Not sure the change will cover all scenarios in internal tests. Please let me know if there are additional failures in internal tests. 
Here are the internal errors, @yongtang  can you please verify ? Thank you!

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/tensorflow/python/framework/test_util.py", line 1526, in decorated
    run_eagerly(self, **kwargs)
  File "/tensorflow/python/framework/test_util.py", line 1510, in run_eagerly
    f(self, *args, **kwargs)
  File "/tensorflow/python/ops/ragged/ragged_tensor_test.py", line 2019, in testToVariantInvalidInputs
    self.assertRaisesRegex(
AssertionError: "must be less than 0, got 0|Shape must be at least rank 1 but is rank 0" does not match "{{function_node __wrapped__RaggedTensorToVariant_RAGGED_RANK_1_device_/job:localhost/replica:0/task:0/device:CPU:0}} Requires the first element of nested_row_splits[0] to be 0 but is 150 [Op:RaggedTensorToVariant]"
 There might be some skew in Graph mode (shape inference error) vs eager mode (kernel check) error messages. Maybe look at the shape inference for this particular op? Hi @yongtang Any update on this PR? Please. Thank you! This PR is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you. This PR was closed because it has been inactive for 14 days since being marked as stale. Please reopen if you'd like to work on this further.
This PR fixes #59084 by return error in case invalid shape set_dim is called.
    
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>