Check for null field in Dispose (fixes #98)