handle empty data in api models