How To Check If Array Of Objects Is Empty In Python