Check that the ID passed isn't empty before calling get_post() in edd_get_discount()
Defensive coding for edd_get_discount_by_code()