using isNotEmpty to check List