Fix OpenCS crash when drag and drop is used with unexpected data, e.g. plain text (Fixes #1543)
replaced an assert with an exception