function isType(type, expected) {
  return type === expected;
}
@param {number} type The type.
@param {number} expected The expected type.
@return {boolean} The given type is exactly the expected type.