Variable checking to avoid warnings.

Variable checking to avoid warnings.