Create CheckFileExtension.js

js function which returns file extension if it has one or else false