Update class.TheApi.php

Fixed an issue with empty reports getting accepted by handler code.