isTrue = (confVal, defVal) => {

  if (confVal == null) {
    return !!defVal;
  } else if (typeof confVal === 'string') {
    var n = parseInt(confVal);
    return (isNaN(n) ? (confVal === 'true') : (n !== 0));
  } else if (typeof confVal === 'boolean') {
    return confVal;
  } else if (typeof confVal === 'number') {
    return (n !== 0);
  }

  return false;

}
Sadly, setting fields with tw means that we lose the type information
since field values are persisted as strings and the type is not
included.

To ensure that flags are always interpreted correctly, the following
function exists.

We regard the following values as `true` (order matters):

# Any string that can be translated into a number unequal `0`
# `"true"`
# Any number unequal `0`
# Boolean `true`

The following as false (order matters):

# Any string that can be translated into number `0`
# Every string unequal `"true"`
# The number `0`
# Boolean `false`