type checking in drap and drop