Added check to avoid that the validate() function will play null files
simplified and improved check of null string in validate()
Merge pull request #14 from d4rkstar/validatefix

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