Since this `contextId` is used as integer in you native code, do not think check whether this is Integer is more accurate?