function getBooleanValueIfSimpleConstant(node) {
  if (node.type === 'Literal') {
    return Boolean(node.value);
  }
  return void 0;
}
Gets the boolean value of a given literal node.

This is used to detect infinity loops (e.g. `while (true) {}`).
Statements preceded by an infinity loop are unreachable if the loop didn't
have any `break` statement.
@param {ASTNode} node A node to get.
@returns {boolean|undefined} a boolean value if the node is a Literal node,
  otherwise `undefined`.