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