Updated grace_period logic to include the membership type grace period.