Fix #630 / use getTypeID

Follow-up on e5bc2013f752ffb327e8fab9062a68690af89df2