DbTaskStorage: Protect against invalid lock_payload
TaskActionToolbox: Combine adjacent ifs