Do you need equals() or toString() for JsUndefined? You could keep it as a case class (`case class JsUndefined(val error: () => String)`) and offer a  `JsUndefined.apply` constructor that creates a JsUndefined from a by-name argument.