Added null check for region when implementing out of range workaround,
since it can be null if the user entered a custom API URL.