Repository: kyoripowered/adventure
Issue: @NonNull not being followed when using GsonComponentSerializer

When converting `"null"` using the GsonComponentSerializer the `deserialize` method returns null even though the method is marked `@NonNull`.
I think it would be best to throw a JsonSyntaxException or something similar in this case.

Version: 7acd956

Code:
```java
System.out.println(GsonComponentSerializer.gson().deserialize("null"))
System.out.println(GsonComponentSerializer.gson().deserialize("null") == null)
```

Output:
```
null
true
```

Changed files:
text-serializer-gson/src/main/java/net/kyori/adventure/text/serializer/gson/ComponentSerializerImpl.java
text-serializer-gson/src/main/java/net/kyori/adventure/text/serializer/gson/GsonComponentSerializerImpl.java
text-serializer-gson/src/test/java/net/kyori/adventure/text/serializer/gson/GsonComponentSerializerTest.java

diff --git a/text-serializer-gson/src/main/java/net/kyori/adventure/text/serializer/gson/ComponentSerializerImpl.java b/text-serializer-gson/src/main/java/net/kyori/adventure/text/serializer/gson/ComponentSerializerImpl.java
index 2fa1686c..56f905bf 100644
--- a/text-serializer-gson/src/main/java/net/kyori/adventure/text/serializer/gson/ComponentSerializerImpl.java
+++ b/text-serializer-gson/src/main/java/net/kyori/adventure/text/serializer/gson/ComponentSerializerImpl.java
@@ -235,7 +235,7 @@ final class ComponentSerializerImpl implements JsonDeserializer<Component>, Json
     return object;
   }
 
-  private static JsonParseException notSureHowToDeserialize(final JsonElement element) {
+  static JsonParseException notSureHowToDeserialize(final Object element) {
     return new JsonParseException("Don't know how to turn " + element + " into a Component");
   }
 
diff --git a/text-serializer-gson/src/main/java/net/kyori/adventure/text/serializer/gson/GsonComponentSerializerImpl.java b/text-serializer-gson/src/main/java/net/kyori/adventure/text/serializer/gson/GsonComponentSerializerImpl.java
index 0b214e22..89197320 100644
--- a/text-serializer-gson/src/main/java/net/kyori/adventure/text/serializer/gson/GsonComponentSerializerImpl.java
+++ b/text-serializer-gson/src/main/java/net/kyori/adventure/text/serializer/gson/GsonComponentSerializerImpl.java
@@ -80,7 +80,9 @@ final class GsonComponentSerializerImpl implements GsonComponentSerializer {
 
   @Override
   public @NonNull Component deserialize(final @NonNull String string) {
-    return this.serializer().fromJson(string, Component.class);
+    final Component component = this.serializer().fromJson(string, Component.class);
+    if(component == null) throw ComponentSerializerImpl.notSureHowToDeserialize(string);
+    return component;
   }
 
   @Override
diff --git a/text-serializer-gson/src/test/java/net/kyori/adventure/text/serializer/gson/GsonComponentSerializerTest.java b/text-serializer-gson/src/test/java/net/kyori/adventure/text/serializer/gson/GsonComponentSerializerTest.java
index 6671aa4e..5db99099 100644
--- a/text-serializer-gson/src/test/java/net/kyori/adventure/text/serializer/gson/GsonComponentSerializerTest.java
+++ b/text-serializer-gson/src/test/java/net/kyori/adventure/text/serializer/gson/GsonComponentSerializerTest.java
@@ -35,8 +35,15 @@ import static net.kyori.adventure.text.serializer.gson.GsonTest.array;
 import static net.kyori.adventure.text.serializer.gson.GsonTest.object;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 class GsonComponentSerializerTest {
+  @Test
+  void testDeserializeNull() {
+    final JsonParseException jpe = assertThrows(JsonParseException.class, () -> GsonComponentSerializer.gson().deserialize("null"));
+    assertTrue(jpe.getMessage().contains("turn null into a Component"));
+  }
+
   @Test
   void testDeserializePrimitive() {
     assertEquals(Component.text("potato"), GsonComponentSerializer.gson().serializer().fromJson(new JsonPrimitive("potato"), Component.class));