need addtional type check to avoid SEGV; ref #2609