Check if variable is set before echo