Use null check instead of isNotEmpty().