Default TestSize is null case to UNKNOWN test size in BuildEvent

If the target is a test but does not have a valid test size that matches the TestSize enums or does not meet certain character traits (such as all lower case), then a null value is returned. Switch statement over a null object will throw a NPE. Add null check before switch statement, so no NPE is thrown. Also add additional logging of the test target prior to getting test size.

RELNOTES: None.
PiperOrigin-RevId: 316098020
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/BUILD b/src/main/java/com/google/devtools/build/lib/analysis/BUILD
index be63362..463a645 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/BUILD
+++ b/src/main/java/com/google/devtools/build/lib/analysis/BUILD
@@ -1023,6 +1023,7 @@
         "//src/main/java/com/google/devtools/build/lib/buildeventstream/proto:build_event_stream_java_proto",
         "//src/main/java/com/google/devtools/build/lib/packages",
         "//src/main/java/com/google/devtools/build/lib/packages:type",
+        "//third_party:flogger",
         "//third_party:guava",
     ],
 )