Refactored javascript for getting/checking if content types exists in collection
Setting content types enabled for list where attaching of content type take place