Use a ternary if for checking main_op is None
Use a ternary if for checking main_op is None

Fixes a minor bug in saved_model which raises an
exception since evaluating ops as booleans are
forbidden in TF 2.x

Fixes #38041

annarev/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gautam1858/tensorflow,davidzchen/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_saved_model,davidzchen/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,aldian/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,aam-at/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,karllessard/tensorflow,frreiss/tensorflow-fred,frreiss/tensorflow-fred,aam-at/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,paolodedios/tensorflow,freedomtan/tensorflow,annarev/tensorflow,tensorflow/tensorflow,yongtang/tensorflow,annarev/tensorflow,freedomtan/tensorflow,aam-at/tensorflow,karllessard/tensorflow,aldian/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,Intel-Corporation/tensorflow,petewarden/tensorflow,tensorflow/tensorflow,sarvex/tensorflow,cxxgtxy/tensorflow,aam-at/tensorflow,aam-at/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,aam-at/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,aam-at/tensorflow,yongtang/tensorflow,annarev/tensorflow,aldian/tensorflow,sarvex/tensorflow,Intel-tensorflow/tensorflow,Intel-tensorflow/tensorflow,sarvex/tensorflow,aam-at/tensorflow,davidzchen/tensorflow,annarev/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-Corporation/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,davidzchen/tensorflow,frreiss/tensorflow-fred,annarev/tensorflow,davidzchen/tensorflow,freedomtan/tensorflow,davidzchen/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,petewarden/tensorflow,davidzchen/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow,davidzchen/tensorflow,petewarden/tensorflow,annarev/tensorflow,yongtang/tensorflow,aldian/tensorflow,aldian/tensorflow,annarev/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,paolodedios/tensorflow,freedomtan/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,annarev/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_libraries_once,gautam1858/tensorflow,davidzchen/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,petewarden/tensorflow,Intel-Corporation/tensorflow,Intel-tensorflow/tensorflow,aldian/tensorflow,Intel-tensorflow/tensorflow,sarvex/tensorflow,karllessard/tensorflow,gautam1858/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow,annarev/tensorflow,cxxgtxy/tensorflow,paolodedios/tensorflow,petewarden/tensorflow,yongtang/tensorflow,tensorflow/tensorflow,freedomtan/tensorflow,paolodedios/tensorflow,Intel-tensorflow/tensorflow,gautam1858/tensorflow,yongtang/tensorflow,petewarden/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,karllessard/tensorflow,gautam1858/tensorflow,frreiss/tensorflow-fred,Intel-tensorflow/tensorflow,gautam1858/tensorflow,cxxgtxy/tensorflow,aldian/tensorflow,tensorflow/tensorflow,paolodedios/tensorflow,petewarden/tensorflow,frreiss/tensorflow-fred,gautam1858/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow,yongtang/tensorflow,paolodedios/tensorflow,frreiss/tensorflow-fred,paolodedios/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,freedomtan/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,annarev/tensorflow,karllessard/tensorflow,tensorflow/tensorflow,karllessard/tensorflow,tensorflow/tensorflow,paolodedios/tensorflow,cxxgtxy/tensorflow,karllessard/tensorflow,tensorflow/tensorflow,davidzchen/tensorflow,karllessard/tensorflow,karllessard/tensorflow,paolodedios/tensorflow,yongtang/tensorflow,petewarden/tensorflow,frreiss/tensorflow-fred,aam-at/tensorflow,sarvex/tensorflow,freedomtan/tensorflow,Intel-Corporation/tensorflow,sarvex/tensorflow,Intel-Corporation/tensorflow,yongtang/tensorflow,frreiss/tensorflow-fred,cxxgtxy/tensorflow,Intel-tensorflow/tensorflow,Intel-tensorflow/tensorflow,davidzchen/tensorflow,aldian/tensorflow,aam-at/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,freedomtan/tensorflow,sarvex/tensorflow,karllessard/tensorflow,sarvex/tensorflow,aam-at/tensorflow,cxxgtxy/tensorflow,cxxgtxy/tensorflow,cxxgtxy/tensorflow,gautam1858/tensorflow,petewarden/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,frreiss/tensorflow-fred