creating generic getType function