Revert "fix comment typo"

This reverts commit ae24d92b384ccc1bd5261ed3f05b1d9bd21e87da.
Revert "remove not null constraint"

This reverts commit 32f5c29a23341c4f1dd6c1241a751201ce286430.
 - apply custom mime mappings in separate method
 - add test case