In this case, we actually want data['lang'] to be the empty string, but not None or 0, so we need the explicit comparision.

Do we have an example of code that copes with the two-letter vs. five-letter codes?  If not, would it be acceptable to consider a two-letter and a five-letter code to match if the five-letter code starts with the two-letter code?