Use isEmpty instead of comparing with empty List