Checks the validity of a language code value:
    - checks whether the code, as lower case, is well formed and valid BCP47
      using the pybcp47 module

def IsValidLanguageCode(lang):
  """
  Checks the validity of a language code value:
    - checks whether the code, as lower case, is well formed and valid BCP47
      using the pybcp47 module
  """
  bcp47_obj = parser.ParseLanguage(str(lang.lower()))
  return bcp47_obj.IsWellformed() and bcp47_obj.IsValid()