Issue/1002 npe media file name

Fix #1002 - fixed NPE in getMediaFileName() due to calling toLowerCase() on null fileExtensionFromMimeType