function for checking if something is a supported file type