Get the filetype of a document.
If filename is an extension (like '.txt'), treat it as an extension without a name. If there is no dot or only an initial dot without extension, return an empty string.
Parameters
- filename: (str) The name of the document
Returns
- (str) The filetype of the document, or an empty string if none is found.