Type Systems for Coordination Languages