pgcraft: use an intermediate variable to check field type
pgcraft: use an intermediate variable to check field type

This helps reducing the diff of the next commit.

gopro/gopro-lib-node.gl,gopro/gopro-lib-node.gl,gopro/gopro-lib-node.gl,gopro/gopro-lib-node.gl