I'd check `variables[i] != null` to be more explicit.