Modified cleanLanguageVar function to use a ternary operator for cleaner syntax, also added an else condition if no query string exists and returns null to ensure the fallback language kicks in.