Better error message if a non-label object is used instead of a label