added typeof module.exports check