Fix present validation check with empty string check

Added empty string check to my previous pull request #43.