Fixes a critical bug when opening the SelectFile dialog and a mime-type of a file is null.