I think instead of checking if the string is empty, we should enclose the socket logic in a try block, and catch AttributeErrors as well as socket.errors. Upon catching those exceptions, we should log the appropriate error messages ("GRAPHITE_PORT / GRAPHITE_HOST settings do not exist, cannot send skyline meta-metrics to graphite" or "cannot connect to graphite at %s:%s for skyline meta-metrics". This will help with backwards compatibility.