code: public String getNonEmptyLanguage(Context context, String language) {
      if (language == null) {
        return inferDeviceLanguage(context);
      }
      return language;
    }
docs: Returns the locale passed in if it is not null, otherwise returns the device locale
  
  @param context to get device locale
  @param language to check if it is null
  @return a non-null locale, either the one passed in, or the device locale