The code was not checking the value returned by getTrid() to make sure it was not null. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=172384499