Fix bug whereby empty type threw error