refactor(util) checkExtension