Prevent addition of empty labels

Added an if that checks for an empty label and prevents it from being added.