type check struct pointers