UGameplayStatics::GetGameMode

Returns the current GameModeBase or Null if it can't be retrieved, such as on the client