Moved getType function to helpers object