MT#6663 Make API more robust when contract has no billing_profile

This should at least not fail with 500

(cherry picked from commit 266d2eb48d610f18ad9bf68f3f0ecaa0c067dab0)