Check for empty message to avoid undefined variables.