Check if filename is a string