Added check to avoid that the validate() function will play null files

This should fix null prompts in validate()