tests: y4mreader: fix string state checkup
tests: y4mreader: fix string state checkup

str cannot be null in that moment, but it may be the end of string.

GStreamer/gstreamer-vaapi,ceyusa/gstreamer-vaapi,ceyusa/gstreamer-vaapi,GStreamer/gstreamer-vaapi