Added tests and code to enforce pointer types going into PrimitiveDecode and PrimitiveDecodeStrict