Discovered in tensorflow/tensorflow#100606 .
Looks like pywrap_library is run both before and after selects 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.