Not a false error in fact it is not an error at all. It is just the message that you wrote in your script when it process null values.
I recommend fixing the script so that it does what you want with null values.
The problem is one of a lack of understanding when you get nothing back and that nothing will not have a file name.
To state it simply - if the file does not exist you will always execute the "ELSE" clause with a null file name.
You have a design problem. You have to figure out what to do if NO file is found.
¯\_(ツ)_/¯