title: UnsupportedOperationException: Serializables don't support default values - Jetpack Compose Navigation
body: <p>I'm using Jetpack Compose Navigation to pass a Health instance to another composable. The below code shows my health class and my Destination.</p>
  <p>Health.kt:</p>
  <pre class="lang-kotlin prettyprint-override"><code>data class Health(
      val height: Int,
      val weight: Int,
      val age: Int,
      val gender: Gender
  ) : Serializable
  
  enum class Gender: Serializable { Male, Female }
  </code></pre>
  <p>NavDestination.kt</p>
  <pre class="lang-kotlin prettyprint-override"><code>                        composable(
                              route = &quot;result/{health}&quot;,
                              arguments = listOf(
                                  navArgument(&quot;health&quot;) {
                                      type =
                                          NavType.SerializableType(Health::class.java)
                                  }
                              )
                          ) { backStackEntry -&gt;
                              val health = (backStackEntry.arguments?.getSerializable(&quot;health&quot;) as? Health) ?: return@composable
                              ResultScreen(navActions = navActions, health = health)
                          }
  </code></pre>
  <p>NavActions.kt</p>
  <pre class="lang-kotlin prettyprint-override"><code>val navigateToResultScreen = { health: Health -&gt;
          navController.navigate(&quot;result/{$health}&quot;)
      }
  </code></pre>
  <p>However, I'm getting this error according to the logcat. Any assistance would be highly appreciated.</p>
  <pre class="lang-kotlin prettyprint-override"><code> E/AndroidRuntime: FATAL EXCEPTION: main
      Process: com.octagon_technologies.bmicalculator, PID: 20788
      java.lang.UnsupportedOperationException: Serializables don't support default values.
          at androidx.navigation.NavType$SerializableType.parseValue(NavType.java:838)
          at androidx.navigation.NavType$SerializableType.parseValue(NavType.java:791)
          at androidx.navigation.NavType.parseAndPut(NavType.java:96)
          at androidx.navigation.NavDeepLink.parseArgument(NavDeepLink.java:299)
          at androidx.navigation.NavDeepLink.getMatchingArguments(NavDeepLink.java:260)
          at androidx.navigation.NavDestination.matchDeepLink(NavDestination.java:474)
          at androidx.navigation.NavGraph.matchDeepLink(NavGraph.java:79)
          at androidx.navigation.NavController.navigate(NavController.java:1034)
          at androidx.navigation.NavController.navigate(NavController.java:1017)
          at androidx.navigation.compose.NavHostControllerKt.navigate(NavHostController.kt:107)
          at androidx.navigation.compose.NavHostControllerKt.navigate$default(NavHostController.kt:106)
          at com.octagon_technologies.bmicalculator.ui.navigation.NavActions$navigateToResultScreen$1.invoke(NavActions.kt:9)
          at com.octagon_technologies.bmicalculator.ui.navigation.NavActions$navigateToResultScreen$1.invoke(NavActions.kt:8)
          at com.octagon_technologies.bmicalculator.ui.screens.home.HomeScreenKt$HomeScreen$1$6.invoke(HomeScreen.kt:122)
          at com.octagon_technologies.bmicalculator.ui.screens.home.HomeScreenKt$HomeScreen$1$6.invoke(HomeScreen.kt:120)
          at com.octagon_technologies.bmicalculator.ui.components.home.CalculateBtnKt$CalculateButton$1$1$1.invoke(CalculateBtn.kt:29)
          at com.octagon_technologies.bmicalculator.ui.components.home.CalculateBtnKt$CalculateButton$1$1$1.invoke(CalculateBtn.kt:29)
  </code></pre>