check if obj is either a number or a bigint.