Small improvement to the use of GetFileType: