add protocol for determining primitive type