toString returns id of class if available