warning suppression

warning suppression by checking a variable before attempting to use it.