check if agent and agent.discount are nil