Discovered in https://github.com/tensorflow/tensorflow/pull/100606 . Looks like `pywrap_library` is run both before and after `select`s are evaluated in Bazel, so this https://github.com/openxla/xla/blob/main/third_party/py/rules_pywrap/pywrap.impl.bzl#L373 check could succeed for `None` values wrapped in `select` which seems unintended.