Add sanity check to billing code; #794