Best way to implement Null Check for lists? <<< TLDR
I have an API Call that saves a list of images to an app state of image lists. However, there are some occasions where the API will return no images and will be Null. When I try to do Null checks, I get the error attached:
How do I check if a value is null... if I get an error that says the value is null on the same line where I'm doing the nullcheck? Pictured below: (I have a test1 and test2 alert above and below this conditional and I only get to test1 when I run it, so I know it's on that line)