don't send undefined through in enums (as it gets converted to null by JSON.stringify), do send through null if present in valids array