add NULL pointer check into MEMBER_2_STRUCT macro