Angular Check Array Is Empty Python Function Vs Method