This seems like a case where we should be validating the language in all cases, not just if an empty string is passed in. What happens if someone passes in a language that doesn't exist or is not enabled in Drupal?