Don't serialise objects and added an extra check