ErrorCallback typedef Null safety

ErrorCallback = void Function(GenericError error)

Callback with error.