Show type of reference in errors