Revert "LPS-29988 Rollback as it has not been tested"

This reverts commit 6abf505e3e5b2f78623e9564f29bb182e49f3bc0.
LPS-29988 NPE
LPS-37244 CKEditor shows default icon even if there is an icon for the given file type
LPS-37244 Check if extension is null or empty
LPS-37244 SF