Improve the platform integration context manager to handle None/falsy tokens gracefully by returning nullcontext