Use ternary for module.exports check.