introduced guard to ubx.h, move checktype fnc implementation in ubx.c