add a check for undefined NODE_ENV