Error handling in assoc